php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch reflection.patch for Reflection related Bug #66218Patch version 2013-12-02 14:13 UTC Return to Bug #66218 | Download this patchThis patch is obsolete Obsoleted by patches: This patch renders other patches obsolete Obsolete patches: Patch Revisions: 2013-12-02 16:02 UTC | 2013-12-02 14:13 UTC | 2013-12-02 13:34 UTCDeveloper: remi@php.netLine 92 (now 92), was 63 lines, now 8 lines + zend_hash_move_forward_ex(CG(function_table), &iterator); } } /* }}} */ diff -up php-5.5.7RC1/ext/reflection/tests/ReflectionExtension_bug66218.phpt.prev php-5.5.7RC1/ext/reflection/tests/ReflectionExtension_bug66218.phpt --- php-5.5.7RC1/ext/reflection/tests/ReflectionExtension_bug66218.phpt.prev 2013-12-02 16:31:00.840348312 +0100 +++ php-5.5.7RC1/ext/reflection/tests/ReflectionExtension_bug66218.phpt 2013-12-02 15:42:47.726878417 +0100 @@ -0,0 +1,25 @@ +--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"); +?> +--FILE-- +<?php +$r = new ReflectionExtension('standard'); +$t = $r->getFunctions(); +var_dump($t['cli_set_process_title']); +var_dump($t['cli_get_process_title']); +?> +Done +--EXPECTF-- +object(ReflectionFunction)#%d (1) { + ["name"]=> + string(21) "cli_set_process_title" +} +object(ReflectionFunction)#%d (1) { + ["name"]=> + string(21) "cli_get_process_title" +} +Done diff -up php-5.5.7RC1/Zend/tests/bug66218.phpt.prev php-5.5.7RC1/Zend/tests/bug66218.phpt --- php-5.5.7RC1/Zend/tests/bug66218.phpt.prev 2013-12-02 16:31:15.704395109 +0100 +++ php-5.5.7RC1/Zend/tests/bug66218.phpt 2013-12-02 14:41:49.085440975 +0100 @@ -0,0 +1,22 @@ +--TEST-- +Bug #66218 zend_register_functions breaks reflection +--SKIPIF-- +<?php +if (PHP_SAPI != "cli") die("Skip: CLI only test"); +?> +--FILE-- +<?php +$tab = get_extension_funcs("standard"); +$fcts = array("dl", "cli_set_process_title", "cli_get_process_title"); +foreach ($fcts as $fct) { + if (in_array($fct, $tab)) { + echo "$fct Ok\n"; + } +} +?> +Done +--EXPECTF-- +dl Ok +cli_set_process_title Ok +cli_get_process_title Ok +Done diff -up php-5.5.7RC1/Zend/zend_builtin_functions.c.prev php-5.5.7RC1/Zend/zend_builtin_functions.c --- php-5.5.7RC1/Zend/zend_builtin_functions.c.prev 2013-12-02 11:29:44.399427824 +0100 +++ php-5.5.7RC1/Zend/zend_builtin_functions.c 2013-12-02 15:08:21.889226383 +0100 @@ -2442,36 +2442,49 @@ ZEND_FUNCTION(extension_loaded) |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Thu Apr 18 19:01:30 2024 UTC |