mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
3e963f8eb4
Functions registered using zend_register_functions instead of zend_module_entry.functions are not seen on reflection. Ex: additional_functions from api_module_entry. Ex: in CLI, dl, cli_set_process_title and cli_get_process_title Note: - also affects functions overrided in extension (should be be reported in extension, where overrided, not in original extension) - also allow extension to call zend_register_functions for various list (instead of having a single bug list)
22 lines
488 B
PHP
22 lines
488 B
PHP
--TEST--
|
|
ReflectionExtension::getFunctions() ##6218 zend_register_functions breaks reflection
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('reflection')) print 'skip missing reflection extension';
|
|
if (PHP_SAPI != "cli") die("skip CLI only test");
|
|
if (!function_exists("dl")) die("skip need dl");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$r = new ReflectionExtension('standard');
|
|
$t = $r->getFunctions();
|
|
var_dump($t['dl']);
|
|
?>
|
|
Done
|
|
--EXPECTF--
|
|
object(ReflectionFunction)#%d (1) {
|
|
["name"]=>
|
|
string(2) "dl"
|
|
}
|
|
Done
|