@ -0,0 +1,18 @@
--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();
?>
--EXPECT--
3
@ -0,0 +1,16 @@
Bug #23279 (exception handler stops after first function call)
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";
Goodbye Cruel World
@ -0,0 +1,30 @@
Bug #23384 (use of class constants in statics)
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";
Array
(
[100] => ten
)
[10] => ten
100100