stas Mon Jun 16 05:20:42 2003 EDT Added files: /php4/tests/lang bug18872.phpt bug23279.phpt bug23384.phpt Log: add tests for fixed bugs
Index: php4/tests/lang/bug18872.phpt +++ php4/tests/lang/bug18872.phpt --TEST-- Bug #18872 (class constant used as default parameter) --FILE-- <?php class FooBar { const BIFF = 3; } function foo($biff = FooBar::BIFF) { echo $biff . "\n"; } foo(); foo(); ?> --EXPECT-- 3 3 Index: php4/tests/lang/bug23279.phpt +++ php4/tests/lang/bug23279.phpt --TEST-- Bug #23279 (exception handler stops after first function call) --FILE-- <?php ob_start(); set_exception_handler('redirect_on_error'); echo "Hello World\n"; throw new Exception; function redirect_on_error($e) { ob_end_clean(); echo "Goodbye Cruel World\n"; } ?> --EXPECT-- Goodbye Cruel World Index: php4/tests/lang/bug23384.phpt +++ php4/tests/lang/bug23384.phpt --TEST-- Bug #23384 (use of class constants in statics) --FILE-- <?php define('TEN', 10); class Foo { const HUN = 100; function test($x = Foo::HUN) { static $arr2 = array(TEN => 'ten'); static $arr = array(Foo::HUN => 'ten'); print_r($arr); print_r($arr2); print_r($x); } } Foo::test(); echo Foo::HUN."\n"; ?> --EXPECT-- Array ( [100] => ten ) Array ( [10] => ten ) 100100 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php