Giter Site home page Giter Site logo

Comments (4)

andot avatar andot commented on May 3, 2024

$value 可能是类名,所以这里才会有这个判断。

不过好像这个判断确实有些多余,在类中定义一个 then 的静态方法作为一个类 Promise 对象来用,好像并没有什么用。

from hprose-php.

pan269 avatar pan269 commented on May 3, 2024

我也注意到了这点
我觉得当 is_string($value) 时可以先用class_exists($value,false)先检查类是否存在然后再检查 method_exists($value, 'then')

说实话 Promise 异步编程这章 我没这么看懂....

from hprose-php.

andot avatar andot commented on May 3, 2024

我把你提交的代码已经合并了。

from hprose-php.

pan269 avatar pan269 commented on May 3, 2024

好的 多谢了

from hprose-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.