Volodymyr Kolesnykov

Results 33 comments of Volodymyr Kolesnykov

`get_defined_vars()` implemented in #1452

I think PHP does that at compile time… Not sure if it is possible to implement this in Zephir as namespaced functions are mangled. Say, `test\test_func` becomes `test_test_func`. And it...

Namespace is a syntactic sugar, there is no notion of namespaces at run time :-(

The current implementation is very simple: ```c void fcall_init(zval *return_value, zval *callable) { zephir_fci *info = ecalloc(1, sizeof(zephir_fci)); char *error = NULL; if (FAILURE == zend_fcall_info_init(callable, IS_CALLABLE_STRICT, &info->fci, &info->fcc, NULL,...

PHP 7.0.17 ZTS DEBUG ``` $this->f() 5.162 self::f() 6.259 self::f() -> true 6.289 $this->f() [slow] 3.973 $this->f() [fast] 0.647 self::f() [fast] 0.645 self::f() -> true [fast] 0.643 ``` PHP 7.0.17...

7.0.17 NTS RELEASE #1509 ``` $this->f() 0.381 self::f() 0.468 self::f() -> true 0.467 ``` fastcall ``` $this->f() 1.187 self::f() 1.453 self::f() -> true 1.467 $this->f() [slow] 0.650 $this->f() [fast] 0.118...

Not sure. The reason is that the optimizer does not have enough information about the environment. For example, ```php class A { public function someMethod() { /* ... */ }...

Basically, I see only two safe cases: 1. A plain function is called. 2. A private final method or private static function is called.

Yes. They are both applicable. #1509 is ready to use, this one is yet to be discussed :-)

@Jurigag it depends For example, in this case: ```php foreach ($array as $value) { $class->doSomething($value); } ``` fcall can help. If the same method is going to be used more...