cvs: php-src /ext/reflection/tests bug38132.phpt

From: Date: Wed, 26 Jul 2006 23:32:07 +0000
Subject: cvs: php-src /ext/reflection/tests bug38132.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-39553@lists.php.net to get a copy of this message
iliaa Wed Jul 26 23:32:07 2006 UTC Modified files: /php-src/ext/reflection/tests bug38132.phpt Log: Added test for bug #38132 http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug38132.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/reflection/tests/bug38132.phpt diff -u /dev/null php-src/ext/reflection/tests/bug38132.phpt:1.2 --- /dev/null Wed Jul 26 23:32:07 2006 +++ php-src/ext/reflection/tests/bug38132.phpt Wed Jul 26 23:32:07 2006 @@ -0,0 +1,34 @@ +--TEST-- +Reflection Bug #38132 (ReflectionClass::getStaticProperties() retains \0 in key names) +--SKIPIF-- +<?php extension_loaded('reflection') or die('skip'); ?> +--FILE-- +<?php +class foo { + static protected $bar = 'baz'; + static public $a = 'a'; +} + +$class = new ReflectionClass('foo'); +$properties = $class->getStaticProperties(); +var_dump($properties, array_keys($properties)); +var_dump(isset($properties['*bar'])); +var_dump(isset($properties["\0*\0bar"])); +var_dump(isset($properties["bar"])); +?> +--EXPECT-- +array(2) { + ["bar"]=> + string(3) "baz" + ["a"]=> + string(1) "a" +} +array(2) { + [0]=> + string(3) "bar" + [1]=> + string(1) "a" +} +bool(false) +bool(false) +bool(true)

« previous php.cvs (#39553) next »