mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Reclassify E_STRICT notices
Per RFC https://wiki.php.net/rfc/reclassify_e_strict While reviewing this, found that there are still three E_STRICTs left in libraries - need to discuss those.
This commit is contained in:
@@ -30,10 +30,10 @@ var_dump(get_class($f2));
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Non-static method foo::bar() should not be called statically in %s on line %d
|
||||
Deprecated: Non-static method foo::bar() should not be called statically in %s on line %d
|
||||
string(3) "foo"
|
||||
|
||||
Strict Standards: Non-static method foo::bar() should not be called statically in %s on line %d
|
||||
Deprecated: Non-static method foo::bar() should not be called statically in %s on line %d
|
||||
string(3) "foo"
|
||||
string(3) "foo"
|
||||
string(3) "foo"
|
||||
|
||||
@@ -10,5 +10,4 @@ abstract class TestClass
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
|
||||
Strict Standards: Static function TestClass::getName() should not be abstract in %sabstract-static.php on line %d
|
||||
===DONE===
|
||||
|
||||
@@ -13,4 +13,4 @@ class Sub extends Base {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of Sub::test() should be compatible with & Base::test($foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_001.php on line %d
|
||||
Warning: Declaration of Sub::test() should be compatible with & Base::test($foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_001.php on line %d
|
||||
|
||||
@@ -13,4 +13,4 @@ class Sub extends Base {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of Sub::test() should be compatible with Base::test($foo, array &$bar, $option = NULL, $extra = 3.1415926535898) in %sargument_restriction_002.php on line %d
|
||||
Warning: Declaration of Sub::test() should be compatible with Base::test($foo, array &$bar, $option = NULL, $extra = 3.1415926535898) in %sargument_restriction_002.php on line %d
|
||||
|
||||
@@ -16,4 +16,4 @@ class Sub extends Base {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of Sub::test() should be compatible with Base::test(Foo $foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_003.php on line %d
|
||||
Warning: Declaration of Sub::test() should be compatible with Base::test(Foo $foo, array $bar, $option = NULL, $extra = 'llllllllll...') in %sargument_restriction_003.php on line %d
|
||||
|
||||
@@ -13,4 +13,4 @@ class Sub extends Base {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of Sub::test() should be compatible with Base::test($foo, $extra = Array) in %sargument_restriction_006.php on line %d
|
||||
Warning: Declaration of Sub::test() should be compatible with Base::test($foo, $extra = Array) in %sargument_restriction_006.php on line %d
|
||||
|
||||
@@ -21,8 +21,8 @@ $b = new Blah();
|
||||
$b->show();
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Accessing static property Blah::$x as non static in %sbug30820.php on line 7
|
||||
Notice: Accessing static property Blah::$x as non static in %sbug30820.php on line 7
|
||||
Blah::$x = 1
|
||||
|
||||
Strict Standards: Accessing static property Blah::$x as non static in %sbug30820.php on line 10
|
||||
Notice: Accessing static property Blah::$x as non static in %sbug30820.php on line 10
|
||||
$this->x = 5
|
||||
|
||||
@@ -17,6 +17,6 @@ $bar->destroyThis();
|
||||
var_dump($bar);
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Only variables should be assigned by reference in %sbug31525.php on line 7
|
||||
Notice: Only variables should be assigned by reference in %sbug31525.php on line 7
|
||||
object(Foo)#1 (0) {
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ Try static instance inside class :
|
||||
New class Singleton1 created
|
||||
Using old class Singleton1
|
||||
|
||||
Strict Standards: Only variables should be assigned by reference in %sbug32322.php on line 49
|
||||
Notice: Only variables should be assigned by reference in %sbug32322.php on line 49
|
||||
Using old class Singleton1
|
||||
Try static instance inside function :
|
||||
New class Singleton2 created
|
||||
Using old class Singleton2
|
||||
|
||||
Strict Standards: Only variables should be assigned by reference in %sbug32322.php on line 55
|
||||
Notice: Only variables should be assigned by reference in %sbug32322.php on line 55
|
||||
Using old class Singleton2
|
||||
Class Singleton1 destroyed at script end
|
||||
Class Singleton2 destroyed at script end
|
||||
|
||||
@@ -16,7 +16,7 @@ array_splice(X::getArr(), 1, 1);
|
||||
print_r(X::getArr());
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Only variables should be passed by reference in %sbug33257.php on line 10
|
||||
Notice: Only variables should be passed by reference in %sbug33257.php on line 10
|
||||
Array
|
||||
(
|
||||
[0] => a
|
||||
|
||||
@@ -23,7 +23,7 @@ Array
|
||||
[0] => main
|
||||
)
|
||||
|
||||
Strict Standards: Only variables should be passed by reference in %sbug35393.php on line 12
|
||||
Notice: Only variables should be passed by reference in %sbug35393.php on line 12
|
||||
Array
|
||||
(
|
||||
[0] => main
|
||||
|
||||
@@ -15,6 +15,6 @@ Foo::get();
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Non-static method Foo::get() should not be called statically in %s on line %d
|
||||
Deprecated: Non-static method Foo::get() should not be called statically in %s on line %d
|
||||
|
||||
Fatal error: Non-static method Foo::__construct() cannot be called statically in %s on line %d
|
||||
|
||||
@@ -40,7 +40,7 @@ $o->bar();
|
||||
--EXPECTF--
|
||||
Fatal error: Uncaught exception 'RuntimeException' in %sbug45805.php:%d
|
||||
Stack trace:
|
||||
#0 %sbug45805.php(%d): PHPUnit_Util_ErrorHandler::handleError(2048, 'Only variables ...', '%s', %d, Array)
|
||||
#0 %sbug45805.php(%d): PHPUnit_Util_ErrorHandler::handleError(8, 'Only variables ...', '%s', %d, Array)
|
||||
#1 [internal function]: B->foo()
|
||||
#2 %sbug45805.php(%d): ReflectionMethod->invoke(Object(B))
|
||||
#3 %sbug45805.php(%d): B->bar()
|
||||
|
||||
@@ -34,6 +34,6 @@ Called class: C
|
||||
|
||||
Warning: get_called_class() called from outside a class in %s on line %d
|
||||
|
||||
Strict Standards: Non-static method D::m() should not be called statically in %s on line %d
|
||||
Deprecated: Non-static method D::m() should not be called statically in %s on line %d
|
||||
|
||||
Fatal error: Using $this when not in object context in %s on line %d
|
||||
|
||||
@@ -36,6 +36,6 @@ int(2)
|
||||
%unicode|string%(9) "__call::c"
|
||||
%unicode|string%(15) "__callStatic::a"
|
||||
|
||||
Strict Standards: Non-static method foo::b() should not be called statically in %s on line %d
|
||||
Deprecated: Non-static method foo::b() should not be called statically in %s on line %d
|
||||
int(2)
|
||||
%unicode|string%(15) "__callStatic::c"
|
||||
|
||||
@@ -33,8 +33,6 @@ $t->hello = "foo";
|
||||
?>
|
||||
--EXPECTF--
|
||||
PRE-CLASS-GUARD
|
||||
|
||||
Strict Standards: Notice and THello1 define the same property ($hello) in the composition of Notice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
|
||||
POST-CLASS-GUARD
|
||||
|
||||
Fatal error: TraitsTest and THello1 define the same property ($hello) in the composition of TraitsTest. However, the definition differs and is considered incompatible. Class was composed in %s on line %d
|
||||
|
||||
@@ -32,6 +32,4 @@ echo "POST-CLASS-GUARD2\n";
|
||||
--EXPECTF--
|
||||
PRE-CLASS-GUARD
|
||||
POST-CLASS-GUARD
|
||||
|
||||
Strict Standards: Notice and THello1 define the same property ($hello) in the composition of Notice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %sbug60536_004.php on line %d
|
||||
POST-CLASS-GUARD2
|
||||
|
||||
@@ -30,9 +30,5 @@ echo "POST-CLASS-GUARD2\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
PRE-CLASS-GUARD
|
||||
|
||||
Strict Standards: Base and THello1 define the same property ($hello) in the composition of SameNameInSubClassProducesNotice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
|
||||
POST-CLASS-GUARD
|
||||
|
||||
Strict Standards: Notice and THello1 define the same property ($hello) in the composition of Notice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
|
||||
POST-CLASS-GUARD2
|
||||
|
||||
@@ -77,8 +77,8 @@ public function setSelf(Foo6 $s) { }
|
||||
|
||||
}
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of Bar4::setSelf() should be compatible with Foo4::setSelf(Foo4 $s) in %sbug60573.php on line %d
|
||||
Warning: Declaration of Bar4::setSelf() should be compatible with Foo4::setSelf(Foo4 $s) in %sbug60573.php on line %d
|
||||
|
||||
Strict Standards: Declaration of Bar5::setSelf() should be compatible with Foo5::setSelf(Base $s) in %sbug60573.php on line %d
|
||||
Warning: Declaration of Bar5::setSelf() should be compatible with Foo5::setSelf(Base $s) in %sbug60573.php on line %d
|
||||
|
||||
Fatal error: Declaration of Bar6::setSelf() must be compatible with Foo6::setSelf(Base $s) in %sbug60573.php on line %d
|
||||
|
||||
@@ -29,4 +29,4 @@ class B extends A {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of B::foo() should be compatible with A::foo() in %sbug62358.php on line %d
|
||||
Warning: Declaration of B::foo() should be compatible with A::foo() in %sbug62358.php on line %d
|
||||
|
||||
@@ -23,7 +23,6 @@ Bar::foo();
|
||||
Foo::bar();
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Static function Foo::bar() should not be abstract in %sbug63111.php on line 3
|
||||
bool(false)
|
||||
bool(false)
|
||||
bool(false)
|
||||
|
||||
@@ -19,6 +19,6 @@ class Child extends Base {
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
Strict Standards: Declaration of Child::foo() should be compatible with Base::foo($var = '123', $more = NULL) in %sbug63336.php on line %d
|
||||
Warning: Declaration of Child::foo() should be compatible with Base::foo($var = '123', $more = NULL) in %sbug63336.php on line %d
|
||||
|
||||
Strict Standards: Declaration of Child::bar() should be compatible with Base::bar($var, $more = 'XXX') in %sbug63336.php on line %d
|
||||
Warning: Declaration of Child::bar() should be compatible with Base::bar($var, $more = 'XXX') in %sbug63336.php on line %d
|
||||
|
||||
@@ -26,5 +26,5 @@ $o = new Smooth1();
|
||||
echo "okey";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of Smooth1::insert() should be compatible with Noisy1::insert(array $data, $option1 = NULL) in %sbug64988.php on line 20
|
||||
Warning: Declaration of Smooth1::insert() should be compatible with Noisy1::insert(array $data, $option1 = NULL) in %sbug64988.php on line 20
|
||||
okey
|
||||
|
||||
@@ -5,20 +5,20 @@ Bug #65322: compile time errors won't trigger auto loading
|
||||
|
||||
spl_autoload_register(function($class) {
|
||||
var_dump($class);
|
||||
class B {}
|
||||
class X {}
|
||||
});
|
||||
|
||||
set_error_handler(function($_, $msg, $file) {
|
||||
var_dump($msg, $file);
|
||||
new B;
|
||||
new X;
|
||||
});
|
||||
|
||||
/* This is just a particular example of a non-fatal compile-time error
|
||||
* If this breaks in future, just find another example and use it instead */
|
||||
eval('abstract class foo { abstract static function bar(); }');
|
||||
eval('class A { function test() { } } class B extends A { function test($a) { } }');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(%d) "Static function foo::bar() should not be abstract"
|
||||
string(60) "Declaration of B::test() should be compatible with A::test()"
|
||||
string(%d) "%s(%d) : eval()'d code"
|
||||
string(1) "B"
|
||||
string(1) "X"
|
||||
|
||||
@@ -19,6 +19,6 @@ $b = new b();
|
||||
$b->test();
|
||||
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s%ebug67436%eb.php on line %d
|
||||
Warning: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s%ebug67436%eb.php on line %d
|
||||
b::test()
|
||||
a::test(c::TESTCONSTANT)
|
||||
|
||||
@@ -21,10 +21,10 @@ foo::__construct();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Non-static method foo::aa() should not be called statically in %s on line %d
|
||||
Deprecated: Non-static method foo::aa() should not be called statically in %s on line %d
|
||||
ok
|
||||
|
||||
Strict Standards: Non-static method foo::aa() should not be called statically in %s on line %d
|
||||
Deprecated: Non-static method foo::aa() should not be called statically in %s on line %d
|
||||
ok
|
||||
|
||||
Fatal error: Cannot call constructor in %s on line %d
|
||||
|
||||
@@ -13,6 +13,6 @@ call_user_func(array('foo', 'teste'));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: %son-static method foo::teste() should not be called statically in %s on line %d
|
||||
Deprecated: %son-static method foo::teste() should not be called statically in %s on line %d
|
||||
|
||||
Fatal error: Using $this when not in object context in %s on line %d
|
||||
|
||||
@@ -18,7 +18,7 @@ var_dump(call_user_func(array('foo', 'teste')));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: %son-static method foo::teste() should not be called statically in %s on line %d
|
||||
Deprecated: %son-static method foo::teste() should not be called statically in %s on line %d
|
||||
%string|unicode%(1) "x"
|
||||
array(1) {
|
||||
[0]=>
|
||||
|
||||
@@ -21,7 +21,7 @@ foo($closure);
|
||||
string(6) "strpos"
|
||||
string(3) "foo"
|
||||
|
||||
Strict Standards: Non-static method bar::baz() should not be called statically in %scallable_type_hint_001.php on line %d
|
||||
Deprecated: Non-static method bar::baz() should not be called statically in %scallable_type_hint_001.php on line %d
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(3) "bar"
|
||||
|
||||
@@ -10,6 +10,5 @@ class test {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Static function test::foo() should not be abstract in %s on line %d
|
||||
|
||||
Fatal error: Class test contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (test::foo) in %s on line %d
|
||||
|
||||
@@ -10,11 +10,11 @@ set_error_handler(function($_, $msg, $file) {
|
||||
|
||||
/* This is just a particular example of a non-fatal compile-time error
|
||||
* If this breaks in future, just find another example and use it instead */
|
||||
eval('abstract class foo { abstract static function bar(); }');
|
||||
eval('class A { function test() { } } class B extends A { function test($a) { } }');
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(%d) "Static function foo::bar() should not be abstract"
|
||||
string(60) "Declaration of B::test() should be compatible with A::test()"
|
||||
string(%d) "%s(%d) : eval()'d code"
|
||||
|
||||
Notice: Undefined variable: undefined in %s on line %d
|
||||
|
||||
@@ -99,13 +99,13 @@ var_dump(call_user_func($f, 'you'));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Non-static method Hello::world() should not be called statically in %s on line %d
|
||||
Deprecated: Non-static method Hello::world() should not be called statically in %s on line %d
|
||||
Hello, you
|
||||
|
||||
Notice: Undefined variable: this in %s on line %d
|
||||
NULL
|
||||
|
||||
Strict Standards: %son-static method Hello::world() should not be called statically in %s on line %d
|
||||
Deprecated: %son-static method Hello::world() should not be called statically in %s on line %d
|
||||
Hello, you
|
||||
|
||||
Notice: Undefined variable: this in %s on line %d
|
||||
|
||||
@@ -20,5 +20,5 @@ class test3 extends test {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of test3::foo() should be compatible with test::foo() in %s on line %d
|
||||
Warning: Declaration of test3::foo() should be compatible with test::foo() in %s on line %d
|
||||
Done
|
||||
|
||||
@@ -20,5 +20,5 @@ class test3 extends test {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of test3::foo() should be compatible with test::foo($arg) in %s on line %d
|
||||
Warning: Declaration of test3::foo() should be compatible with test::foo($arg) in %s on line %d
|
||||
Done
|
||||
|
||||
@@ -20,5 +20,5 @@ class test3 extends test {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of test3::foo() should be compatible with test::foo($arg) in %s on line %d
|
||||
Warning: Declaration of test3::foo() should be compatible with test::foo($arg) in %s on line %d
|
||||
Done
|
||||
|
||||
@@ -20,5 +20,5 @@ class test3 extends test {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of test3::foo() should be compatible with & test::foo() in %s on line %d
|
||||
Warning: Declaration of test3::foo() should be compatible with & test::foo() in %s on line %d
|
||||
Done
|
||||
|
||||
@@ -20,5 +20,5 @@ class test3 extends test {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of test3::foo() should be compatible with test::foo($arg, $arg2 = NULL) in %s on line %d
|
||||
Warning: Declaration of test3::foo() should be compatible with test::foo($arg, $arg2 = NULL) in %s on line %d
|
||||
Done
|
||||
|
||||
@@ -20,5 +20,5 @@ class test3 extends test {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of test3::foo() should be compatible with test::foo($arg, &$arg2 = NULL) in %s on line %d
|
||||
Warning: Declaration of test3::foo() should be compatible with test::foo($arg, &$arg2 = NULL) in %s on line %d
|
||||
Done
|
||||
|
||||
@@ -20,5 +20,5 @@ class test3 extends test {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of test3::foo() should be compatible with test::foo(Test $arg) in %s on line %d
|
||||
Warning: Declaration of test3::foo() should be compatible with test::foo(Test $arg) in %s on line %d
|
||||
Done
|
||||
|
||||
@@ -20,5 +20,5 @@ class test3 extends test {
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of test3::foo() should be compatible with test::foo(Test $arg) in %s on line %d
|
||||
Warning: Declaration of test3::foo() should be compatible with test::foo(Test $arg) in %s on line %d
|
||||
Done
|
||||
|
||||
@@ -27,17 +27,17 @@ call_user_func(array('foo', 'test'));
|
||||
object(foo)#%d (0) {
|
||||
}
|
||||
|
||||
Strict Standards: Non-static method foo::test() should not be called statically in %s on line %d
|
||||
Deprecated: Non-static method foo::test() should not be called statically in %s on line %d
|
||||
|
||||
Strict Standards: Non-static method bar::show() should not be called statically in %s on line %d
|
||||
Deprecated: Non-static method bar::show() should not be called statically in %s on line %d
|
||||
object(foo)#%d (0) {
|
||||
}
|
||||
object(foo)#%d (0) {
|
||||
}
|
||||
|
||||
Strict Standards: %son-static method foo::test() should not be called statically in %s on line %d
|
||||
Deprecated: %son-static method foo::test() should not be called statically in %s on line %d
|
||||
|
||||
Strict Standards: Non-static method bar::show() should not be called statically in %s on line %d
|
||||
Deprecated: Non-static method bar::show() should not be called statically in %s on line %d
|
||||
object(foo)#%d (0) {
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ NULL
|
||||
int(2)
|
||||
int(1)
|
||||
|
||||
Strict Standards: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
|
||||
Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
|
||||
int(%d)
|
||||
|
||||
Warning: Illegal offset type in %s on line %d
|
||||
|
||||
@@ -14,6 +14,6 @@ var_dump($array[$fp]);
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
|
||||
Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
|
||||
int(%d)
|
||||
Done
|
||||
|
||||
@@ -19,7 +19,7 @@ var_dump($t);
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Accessing static property test::$foo as non static in %s on line %d
|
||||
Notice: Accessing static property test::$foo as non static in %s on line %d
|
||||
object(test)#%d (1) {
|
||||
["foo"]=>
|
||||
int(5)
|
||||
|
||||
@@ -35,7 +35,5 @@ var_dump(property_exists('TraitsTest2', 'foo'));
|
||||
--EXPECTF--
|
||||
PRE-CLASS-GUARD-TraitsTest
|
||||
PRE-CLASS-GUARD-TraitsTest2
|
||||
|
||||
Strict Standards: THello1 and THello2 define the same property ($foo) in the composition of TraitsTest2. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
@@ -33,8 +33,6 @@ $t->hello = "foo";
|
||||
?>
|
||||
--EXPECTF--
|
||||
PRE-CLASS-GUARD
|
||||
|
||||
Strict Standards: Notice and THello1 define the same property ($hello) in the composition of Notice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
|
||||
POST-CLASS-GUARD
|
||||
|
||||
Fatal error: TraitsTest and THello1 define the same property ($hello) in the composition of TraitsTest. However, the definition differs and is considered incompatible. Class was composed in %s on line %d
|
||||
|
||||
@@ -32,6 +32,4 @@ echo "POST-CLASS-GUARD2\n";
|
||||
--EXPECTF--
|
||||
PRE-CLASS-GUARD
|
||||
POST-CLASS-GUARD
|
||||
|
||||
Strict Standards: Notice and THello1 define the same property ($hello) in the composition of Notice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
|
||||
POST-CLASS-GUARD2
|
||||
|
||||
@@ -30,9 +30,5 @@ echo "POST-CLASS-GUARD2\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
PRE-CLASS-GUARD
|
||||
|
||||
Strict Standards: Base and THello1 define the same property ($hello) in the composition of SameNameInSubClassProducesNotice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
|
||||
POST-CLASS-GUARD
|
||||
|
||||
Strict Standards: Notice and THello1 define the same property ($hello) in the composition of Notice. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
|
||||
POST-CLASS-GUARD2
|
||||
|
||||
@@ -42,9 +42,7 @@ var_dump($b);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: BaseWithPropA and AHelloProperty define the same property ($hello) in the composition of SubclassA. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
|
||||
|
||||
Strict Standards: BaseWithTPropB and AHelloProperty define the same property ($hello) in the composition of SubclassB. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in %s on line %d
|
||||
object(SubclassClassicInheritance)#1 (1) {
|
||||
["hello"]=>
|
||||
int(0)
|
||||
|
||||
@@ -710,7 +710,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons
|
||||
|
||||
if (zend_fcall_info_init(arg, 0, fci, fcc, NULL, &is_callable_error) == SUCCESS) {
|
||||
if (is_callable_error) {
|
||||
*severity = E_STRICT;
|
||||
*severity = E_DEPRECATED;
|
||||
zend_spprintf(error, 0, "to be a valid callback, %s", is_callable_error);
|
||||
efree(is_callable_error);
|
||||
*spec = spec_walk;
|
||||
@@ -772,7 +772,7 @@ static int zend_parse_arg(int arg_num, zval *arg, va_list *va, const char **spec
|
||||
zend_zval_type_name(arg));
|
||||
}
|
||||
}
|
||||
if (severity != E_STRICT) {
|
||||
if (severity != E_DEPRECATED) {
|
||||
return FAILURE;
|
||||
}
|
||||
}
|
||||
@@ -1638,7 +1638,7 @@ ZEND_API int array_set_zval_key(HashTable *ht, zval *key, zval *value) /* {{{ */
|
||||
result = zend_symtable_update(ht, STR_EMPTY_ALLOC(), value);
|
||||
break;
|
||||
case IS_RESOURCE:
|
||||
zend_error(E_STRICT, "Resource ID#" ZEND_LONG_FMT " used as offset, casting to integer (%pd)", Z_RES_HANDLE_P(key), Z_RES_HANDLE_P(key));
|
||||
zend_error(E_NOTICE, "Resource ID#" ZEND_LONG_FMT " used as offset, casting to integer (%pd)", Z_RES_HANDLE_P(key), Z_RES_HANDLE_P(key));
|
||||
result = zend_hash_index_update(ht, Z_RES_HANDLE_P(key), value);
|
||||
break;
|
||||
case IS_FALSE:
|
||||
@@ -3098,7 +3098,7 @@ get_function_via_handler:
|
||||
int severity;
|
||||
char *verb;
|
||||
if (fcc->function_handler->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
severity = E_STRICT;
|
||||
severity = E_DEPRECATED;
|
||||
verb = "should not";
|
||||
} else {
|
||||
/* An internal function assumes $this is present and won't check that. So PHP would crash by allowing the call. */
|
||||
|
||||
@@ -854,7 +854,7 @@ ZEND_API void ZEND_FASTCALL zend_wrong_callback_error(int severity, int num, cha
|
||||
break; \
|
||||
} \
|
||||
} else if (UNEXPECTED(_error != NULL)) { \
|
||||
zend_wrong_callback_error(E_STRICT, _i, _error); \
|
||||
zend_wrong_callback_error(E_DEPRECATED, _i, _error); \
|
||||
}
|
||||
|
||||
#define Z_PARAM_FUNC(dest_fci, dest_fcc) \
|
||||
|
||||
@@ -4323,9 +4323,6 @@ void zend_begin_method_decl(zend_op_array *op_array, zend_string *name, zend_boo
|
||||
"%s::%s() must be omitted", ce->name->val, name->val);
|
||||
}
|
||||
op_array->fn_flags |= ZEND_ACC_ABSTRACT;
|
||||
} else if (is_static && (op_array->fn_flags & ZEND_ACC_ABSTRACT)) {
|
||||
zend_error(E_STRICT, "Static function %s::%s() should not be abstract",
|
||||
ce->name->val, name->val);
|
||||
}
|
||||
|
||||
if (op_array->fn_flags & ZEND_ACC_ABSTRACT) {
|
||||
|
||||
@@ -1370,7 +1370,7 @@ str_index:
|
||||
hval = zend_dval_to_lval(Z_DVAL_P(dim));
|
||||
goto num_index;
|
||||
case IS_RESOURCE:
|
||||
zend_error(E_STRICT, "Resource ID#%pd used as offset, casting to integer (%pd)", Z_RES_HANDLE_P(dim), Z_RES_HANDLE_P(dim));
|
||||
zend_error(E_NOTICE, "Resource ID#%pd used as offset, casting to integer (%pd)", Z_RES_HANDLE_P(dim), Z_RES_HANDLE_P(dim));
|
||||
hval = Z_RES_HANDLE_P(dim);
|
||||
goto num_index;
|
||||
case IS_FALSE:
|
||||
|
||||
@@ -752,7 +752,7 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache) /
|
||||
if (error[0] >= 'a' && error[0] <= 'z') {
|
||||
error[0] += ('A' - 'a');
|
||||
}
|
||||
zend_error(E_STRICT, "%s", error);
|
||||
zend_error(E_DEPRECATED, "%s", error);
|
||||
efree(error);
|
||||
}
|
||||
zend_string_release(callable_name);
|
||||
|
||||
@@ -565,12 +565,10 @@ static void do_inheritance_check_on_method(zend_function *child, zend_function *
|
||||
if (UNEXPECTED(!zend_do_perform_implementation_check(child, child->common.prototype))) {
|
||||
zend_error_noreturn(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name->val, zend_get_function_declaration(child->common.prototype)->val);
|
||||
}
|
||||
} else if (EG(error_reporting) & E_STRICT || Z_TYPE(EG(user_error_handler)) != IS_UNDEF) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
|
||||
if (UNEXPECTED(!zend_do_perform_implementation_check(child, parent))) {
|
||||
zend_string *method_prototype = zend_get_function_declaration(parent);
|
||||
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name->val, method_prototype->val);
|
||||
zend_string_free(method_prototype);
|
||||
}
|
||||
} else if (UNEXPECTED(!zend_do_perform_implementation_check(child, parent))) {
|
||||
zend_string *method_prototype = zend_get_function_declaration(parent);
|
||||
zend_error(E_WARNING, "Declaration of %s::%s() should be compatible with %s", ZEND_FN_SCOPE_NAME(child), child->common.function_name->val, method_prototype->val);
|
||||
zend_string_free(method_prototype);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
@@ -1494,16 +1492,10 @@ static void zend_do_traits_property_binding(zend_class_entry *ce) /* {{{ */
|
||||
property_info->ce->name->val,
|
||||
prop_name->val,
|
||||
ce->name->val);
|
||||
} else {
|
||||
zend_error(E_STRICT,
|
||||
"%s and %s define the same property ($%s) in the composition of %s. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed",
|
||||
find_first_definition(ce, i, prop_name, coliding_prop->ce)->name->val,
|
||||
property_info->ce->name->val,
|
||||
prop_name->val,
|
||||
ce->name->val);
|
||||
zend_string_release(prop_name);
|
||||
continue;
|
||||
}
|
||||
|
||||
zend_string_release(prop_name);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ static zend_always_inline uint32_t zend_get_property_offset(zend_class_entry *ce
|
||||
|| UNEXPECTED((flags & ZEND_ACC_PRIVATE))) {
|
||||
if (UNEXPECTED((flags & ZEND_ACC_STATIC) != 0)) {
|
||||
if (!silent) {
|
||||
zend_error(E_STRICT, "Accessing static property %s::$%s as non static", ce->name->val, member->val);
|
||||
zend_error(E_NOTICE, "Accessing static property %s::$%s as non static", ce->name->val, member->val);
|
||||
}
|
||||
return ZEND_DYNAMIC_PROPERTY_OFFSET;
|
||||
}
|
||||
@@ -401,7 +401,7 @@ ZEND_API zend_property_info *zend_get_property_info(zend_class_entry *ce, zend_s
|
||||
|| UNEXPECTED((flags & ZEND_ACC_PRIVATE))) {
|
||||
if (UNEXPECTED((flags & ZEND_ACC_STATIC) != 0)) {
|
||||
if (!silent) {
|
||||
zend_error(E_STRICT, "Accessing static property %s::$%s as non static", ce->name->val, member->val);
|
||||
zend_error(E_NOTICE, "Accessing static property %s::$%s as non static", ce->name->val, member->val);
|
||||
}
|
||||
}
|
||||
goto exit;
|
||||
|
||||
@@ -2233,7 +2233,7 @@ ZEND_VM_HANDLER(39, ZEND_ASSIGN_REF, VAR|CV, VAR|CV)
|
||||
if (!OP2_FREE) {
|
||||
PZVAL_LOCK(value_ptr); /* undo the effect of get_zval_ptr_ptr() */
|
||||
}
|
||||
zend_error(E_STRICT, "Only variables should be assigned by reference");
|
||||
zend_error(E_NOTICE, "Only variables should be assigned by reference");
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
FREE_OP2_VAR_PTR();
|
||||
HANDLE_EXCEPTION();
|
||||
@@ -2936,7 +2936,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, CONST|VAR, CONST|TMPVAR|UNUSE
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(
|
||||
object ? E_DEPRECATED : E_STRICT,
|
||||
E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically%s",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val,
|
||||
object ? ", assuming $this from incompatible context" : "");
|
||||
@@ -3087,7 +3087,7 @@ ZEND_VM_C_LABEL(try_function_name):
|
||||
}
|
||||
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(E_STRICT,
|
||||
zend_error(E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val);
|
||||
} else {
|
||||
@@ -3170,7 +3170,7 @@ ZEND_VM_HANDLER(118, ZEND_INIT_USER_CALL, CONST, CONST|TMPVAR|CV)
|
||||
} else if (func->common.scope &&
|
||||
!(func->common.fn_flags & ZEND_ACC_STATIC)) {
|
||||
if (func->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(E_STRICT,
|
||||
zend_error(E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically",
|
||||
func->common.scope->name->val, func->common.function_name->val);
|
||||
} else {
|
||||
@@ -3998,7 +3998,7 @@ ZEND_VM_HANDLER(106, ZEND_SEND_VAR_NO_REF, VAR|CV, ANY)
|
||||
if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
|
||||
!(opline->extended_value & ZEND_ARG_SEND_SILENT) :
|
||||
!ARG_MAY_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
zend_error(E_STRICT, "Only variables should be passed by reference");
|
||||
zend_error(E_NOTICE, "Only variables should be passed by reference");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1958,7 +1958,7 @@ try_function_name:
|
||||
}
|
||||
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(E_STRICT,
|
||||
zend_error(E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val);
|
||||
} else {
|
||||
@@ -2350,7 +2350,7 @@ try_function_name:
|
||||
}
|
||||
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(E_STRICT,
|
||||
zend_error(E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val);
|
||||
} else {
|
||||
@@ -2539,7 +2539,7 @@ try_function_name:
|
||||
}
|
||||
if (!(fbc->common.fn_flags & ZEND_ACC_STATIC)) {
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(E_STRICT,
|
||||
zend_error(E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val);
|
||||
} else {
|
||||
@@ -5075,7 +5075,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(
|
||||
object ? E_DEPRECATED : E_STRICT,
|
||||
E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically%s",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val,
|
||||
object ? ", assuming $this from incompatible context" : "");
|
||||
@@ -5138,7 +5138,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CONS
|
||||
} else if (func->common.scope &&
|
||||
!(func->common.fn_flags & ZEND_ACC_STATIC)) {
|
||||
if (func->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(E_STRICT,
|
||||
zend_error(E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically",
|
||||
func->common.scope->name->val, func->common.function_name->val);
|
||||
} else {
|
||||
@@ -6999,7 +6999,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(
|
||||
object ? E_DEPRECATED : E_STRICT,
|
||||
E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically%s",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val,
|
||||
object ? ", assuming $this from incompatible context" : "");
|
||||
@@ -8483,7 +8483,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(
|
||||
object ? E_DEPRECATED : E_STRICT,
|
||||
E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically%s",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val,
|
||||
object ? ", assuming $this from incompatible context" : "");
|
||||
@@ -8546,7 +8546,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_CV_H
|
||||
} else if (func->common.scope &&
|
||||
!(func->common.fn_flags & ZEND_ACC_STATIC)) {
|
||||
if (func->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(E_STRICT,
|
||||
zend_error(E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically",
|
||||
func->common.scope->name->val, func->common.function_name->val);
|
||||
} else {
|
||||
@@ -10030,7 +10030,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_C
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(
|
||||
object ? E_DEPRECATED : E_STRICT,
|
||||
E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically%s",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val,
|
||||
object ? ", assuming $this from incompatible context" : "");
|
||||
@@ -10093,7 +10093,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_USER_CALL_SPEC_CONST_TMPV
|
||||
} else if (func->common.scope &&
|
||||
!(func->common.fn_flags & ZEND_ACC_STATIC)) {
|
||||
if (func->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(E_STRICT,
|
||||
zend_error(E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically",
|
||||
func->common.scope->name->val, func->common.function_name->val);
|
||||
} else {
|
||||
@@ -13626,7 +13626,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_VAR_HANDL
|
||||
if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
|
||||
!(opline->extended_value & ZEND_ARG_SEND_SILENT) :
|
||||
!ARG_MAY_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
zend_error(E_STRICT, "Only variables should be passed by reference");
|
||||
zend_error(E_NOTICE, "Only variables should be passed by reference");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15890,7 +15890,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(
|
||||
object ? E_DEPRECATED : E_STRICT,
|
||||
E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically%s",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val,
|
||||
object ? ", assuming $this from incompatible context" : "");
|
||||
@@ -16701,7 +16701,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_VAR_HANDLE
|
||||
if (!(free_op2 != NULL)) {
|
||||
PZVAL_LOCK(value_ptr); /* undo the effect of get_zval_ptr_ptr() */
|
||||
}
|
||||
zend_error(E_STRICT, "Only variables should be assigned by reference");
|
||||
zend_error(E_NOTICE, "Only variables should be assigned by reference");
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
if (free_op2) {zval_ptr_dtor_nogc(free_op2);};
|
||||
HANDLE_EXCEPTION();
|
||||
@@ -17463,7 +17463,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(
|
||||
object ? E_DEPRECATED : E_STRICT,
|
||||
E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically%s",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val,
|
||||
object ? ", assuming $this from incompatible context" : "");
|
||||
@@ -18938,7 +18938,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_VAR_CV_HANDLER
|
||||
if (!0) {
|
||||
PZVAL_LOCK(value_ptr); /* undo the effect of get_zval_ptr_ptr() */
|
||||
}
|
||||
zend_error(E_STRICT, "Only variables should be assigned by reference");
|
||||
zend_error(E_NOTICE, "Only variables should be assigned by reference");
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
@@ -19078,7 +19078,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(
|
||||
object ? E_DEPRECATED : E_STRICT,
|
||||
E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically%s",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val,
|
||||
object ? ", assuming $this from incompatible context" : "");
|
||||
@@ -20635,7 +20635,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INIT_STATIC_METHOD_CALL_SPEC_V
|
||||
but passing $this. This is done for compatibility with php-4. */
|
||||
if (fbc->common.fn_flags & ZEND_ACC_ALLOW_STATIC) {
|
||||
zend_error(
|
||||
object ? E_DEPRECATED : E_STRICT,
|
||||
E_DEPRECATED,
|
||||
"Non-static method %s::%s() should not be called statically%s",
|
||||
fbc->common.scope->name->val, fbc->common.function_name->val,
|
||||
object ? ", assuming $this from incompatible context" : "");
|
||||
@@ -26623,7 +26623,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_SEND_VAR_NO_REF_SPEC_CV_HANDLE
|
||||
if ((opline->extended_value & ZEND_ARG_COMPILE_TIME_BOUND) ?
|
||||
!(opline->extended_value & ZEND_ARG_SEND_SILENT) :
|
||||
!ARG_MAY_BE_SENT_BY_REF(EX(call)->func, opline->op2.num)) {
|
||||
zend_error(E_STRICT, "Only variables should be passed by reference");
|
||||
zend_error(E_NOTICE, "Only variables should be passed by reference");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31011,7 +31011,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_VAR_HANDLER
|
||||
if (!(free_op2 != NULL)) {
|
||||
PZVAL_LOCK(value_ptr); /* undo the effect of get_zval_ptr_ptr() */
|
||||
}
|
||||
zend_error(E_STRICT, "Only variables should be assigned by reference");
|
||||
zend_error(E_NOTICE, "Only variables should be assigned by reference");
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
if (free_op2) {zval_ptr_dtor_nogc(free_op2);};
|
||||
HANDLE_EXCEPTION();
|
||||
@@ -34309,7 +34309,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(
|
||||
if (!0) {
|
||||
PZVAL_LOCK(value_ptr); /* undo the effect of get_zval_ptr_ptr() */
|
||||
}
|
||||
zend_error(E_STRICT, "Only variables should be assigned by reference");
|
||||
zend_error(E_NOTICE, "Only variables should be assigned by reference");
|
||||
if (UNEXPECTED(EG(exception) != NULL)) {
|
||||
|
||||
HANDLE_EXCEPTION();
|
||||
|
||||
@@ -243,7 +243,7 @@ bool(true)
|
||||
-- Iteration 24 --
|
||||
bool(true)
|
||||
|
||||
Strict Standards: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
|
||||
Notice: Resource ID#%d used as offset, casting to integer (%d) in %s on line %d
|
||||
|
||||
Notice: session_encode(): Skipping numeric key %d in %s on line %d
|
||||
bool(false)
|
||||
|
||||
@@ -361,7 +361,7 @@ fetch_dim_string:
|
||||
}
|
||||
return retval;
|
||||
case IS_RESOURCE:
|
||||
zend_error(E_STRICT, "Resource ID#%pd used as offset, casting to integer (%pd)", Z_RES_P(offset)->handle, Z_RES_P(offset)->handle);
|
||||
zend_error(E_NOTICE, "Resource ID#%pd used as offset, casting to integer (%pd)", Z_RES_P(offset)->handle, Z_RES_P(offset)->handle);
|
||||
index = Z_RES_P(offset)->handle;
|
||||
goto num_index;
|
||||
case IS_DOUBLE:
|
||||
|
||||
@@ -44,7 +44,7 @@ Notice: Undefined index: epic_magic in %sbug62978.php on line %d
|
||||
NULL
|
||||
bool(false)
|
||||
|
||||
Strict Standards: Resource ID#%d used as offset, casting to integer (%d) in %sbug62978.php on line %d
|
||||
Notice: Resource ID#%d used as offset, casting to integer (%d) in %sbug62978.php on line %d
|
||||
|
||||
Notice: Undefined offset: %d in %sbug62978.php on line %d
|
||||
NULL
|
||||
|
||||
@@ -127,7 +127,7 @@ test(array('InterClass', 'square'), array(1, 2));
|
||||
-- simple class with public variable and method --
|
||||
SimpleClass::square
|
||||
|
||||
Strict Standards: array_map() expects parameter 1 to be a valid callback, non-static method SimpleClass::square() should not be called statically in %sarray_map_object1.php on line %d
|
||||
Deprecated: array_map() expects parameter 1 to be a valid callback, non-static method SimpleClass::square() should not be called statically in %sarray_map_object1.php on line %d
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(1)
|
||||
@@ -156,7 +156,7 @@ NULL
|
||||
-- abstract class --
|
||||
ChildClass::emptyFunction
|
||||
|
||||
Strict Standards: array_map() expects parameter 1 to be a valid callback, non-static method ChildClass::emptyFunction() should not be called statically in %sarray_map_object1.php on line %d
|
||||
Deprecated: array_map() expects parameter 1 to be a valid callback, non-static method ChildClass::emptyFunction() should not be called statically in %sarray_map_object1.php on line %d
|
||||
defined in child
|
||||
defined in child
|
||||
array(2) {
|
||||
@@ -169,7 +169,7 @@ array(2) {
|
||||
-- class with final method --
|
||||
FinalClass::finalMethod
|
||||
|
||||
Strict Standards: array_map() expects parameter 1 to be a valid callback, non-static method FinalClass::finalMethod() should not be called statically in %sarray_map_object1.php on line %d
|
||||
Deprecated: array_map() expects parameter 1 to be a valid callback, non-static method FinalClass::finalMethod() should not be called statically in %sarray_map_object1.php on line %d
|
||||
This function can't be overloaded
|
||||
This function can't be overloaded
|
||||
array(2) {
|
||||
|
||||
@@ -9,5 +9,5 @@ var_dump(next(f()));
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Strict Standards: Only variables should be passed by reference in %s on line %d
|
||||
Notice: Only variables should be passed by reference in %s on line %d
|
||||
int(2)
|
||||
@@ -35,9 +35,9 @@ echo "Done";
|
||||
|
||||
-- Incorrect Method: --
|
||||
|
||||
Strict Standards: Only variables should be passed by reference in %s on line %d
|
||||
Notice: Only variables should be passed by reference in %s on line %d
|
||||
|
||||
Strict Standards: Only variables should be passed by reference in %s on line %d
|
||||
Notice: Only variables should be passed by reference in %s on line %d
|
||||
string(4) "zero"
|
||||
|
||||
-- Correct Method: --
|
||||
|
||||
@@ -42,7 +42,7 @@ echo "Done";
|
||||
|
||||
-- Reference result of array_shift: --
|
||||
|
||||
Strict Standards: Only variables should be assigned by reference in %s on line %d
|
||||
Notice: Only variables should be assigned by reference in %s on line %d
|
||||
a = 1, b = 2
|
||||
|
||||
-- Reference first element before array_shift: --
|
||||
|
||||
@@ -33,7 +33,7 @@ array_intersect_key (
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Only variables should be passed by reference in %s on line %d
|
||||
Notice: Only variables should be passed by reference in %s on line %d
|
||||
object(Test)#%d (4) {
|
||||
["_table"]=>
|
||||
string(0) ""
|
||||
|
||||
@@ -24,5 +24,5 @@ var_dump(prev(f()));
|
||||
--EXPECTF--
|
||||
-- Passing an indirect temporary variable --
|
||||
|
||||
Strict Standards: Only variables should be passed by reference in %s on line %d
|
||||
Notice: Only variables should be passed by reference in %s on line %d
|
||||
int(1)
|
||||
|
||||
@@ -107,7 +107,7 @@ array(2) {
|
||||
ini.get("assert.callback") => [f2]
|
||||
|
||||
|
||||
Strict Standards: Non-static method c1::assert() should not be called statically in %s on line 53
|
||||
Deprecated: Non-static method c1::assert() should not be called statically in %s on line 53
|
||||
Class assertion failed 53, "0 != 0"
|
||||
NULL
|
||||
|
||||
|
||||
@@ -14,4 +14,4 @@ class bar extends php_user_filter {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of bar::filter() should be compatible with php_user_filter::filter($in, $out, &$consumed, $closing) in %s on line %d
|
||||
Warning: Declaration of bar::filter() should be compatible with php_user_filter::filter($in, $out, &$consumed, $closing) in %s on line %d
|
||||
|
||||
@@ -9,4 +9,4 @@ class foo extends php_user_filter {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of foo::filter() should be compatible with php_user_filter::filter($in, $out, &$consumed, $closing) in %s on line %d
|
||||
Warning: Declaration of foo::filter() should be compatible with php_user_filter::filter($in, $out, &$consumed, $closing) in %s on line %d
|
||||
|
||||
@@ -9,4 +9,4 @@ class foo extends php_user_filter {
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of foo::onCreate() should be compatible with php_user_filter::onCreate() in %s on line %d
|
||||
Warning: Declaration of foo::onCreate() should be compatible with php_user_filter::onCreate() in %s on line %d
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
--TEST--
|
||||
Bug #32647 (Using register_shutdown_function() with invalid callback can crash PHP)
|
||||
--INI--
|
||||
error_reporting=4095
|
||||
display_errors=1
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -49,13 +46,13 @@ Warning: register_shutdown_function(): Invalid shutdown callback 'Array' passed
|
||||
|
||||
Warning: register_shutdown_function(): Invalid shutdown callback 'bar' passed in %s on line %d
|
||||
|
||||
Strict Standards: Non-static method bar::barfoo() should not be called statically in %sbug32647.php on line %d
|
||||
Deprecated: Non-static method bar::barfoo() should not be called statically in %sbug32647.php on line %d
|
||||
|
||||
Warning: register_shutdown_function(): Invalid shutdown callback 'bar::foobar' passed in %sbug32647.php on line %d
|
||||
foo!
|
||||
|
||||
Strict Standards: Non-static method bar::barfoo() should not be called statically in Unknown on line 0
|
||||
Deprecated: Non-static method bar::barfoo() should not be called statically in Unknown on line 0
|
||||
|
||||
Strict Standards: Non-static method bar::barfoo() should not be called statically in Unknown on line 0
|
||||
Deprecated: Non-static method bar::barfoo() should not be called statically in Unknown on line 0
|
||||
bar!
|
||||
bar!
|
||||
|
||||
@@ -15,7 +15,7 @@ Exception::getMessage();
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
|
||||
Strict Standards: Non-static method foo::bar() should not be called statically in %sbug47857.php on line %d
|
||||
Deprecated: Non-static method foo::bar() should not be called statically in %sbug47857.php on line %d
|
||||
ok
|
||||
bool(false)
|
||||
|
||||
|
||||
@@ -31,6 +31,4 @@ echo "Done\n"; // shouldn't be displayed
|
||||
--EXPECTF--
|
||||
Call to function show()
|
||||
|
||||
Strict Standards: Static function fail::func() should not be abstract in %sabstract_static.php(%d) : eval()'d code on line %d
|
||||
|
||||
Fatal error: Class fail contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (fail::func) in %sabstract_static.php(%d) : eval()'d code on line %d
|
||||
|
||||
@@ -34,8 +34,15 @@ echo $clone->name . "\n";
|
||||
echo $clone->address . "\n";
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
--EXPECTF--
|
||||
Notice: Accessing static property MyCloneable::$id as non static in %s on line %d
|
||||
|
||||
Notice: Accessing static property MyCloneable::$id as non static in %s on line %d
|
||||
0
|
||||
|
||||
Notice: Accessing static property MyCloneable::$id as non static in %s on line %d
|
||||
|
||||
Notice: Accessing static property MyCloneable::$id as non static in %s on line %d
|
||||
1
|
||||
Hello
|
||||
New York
|
||||
|
||||
@@ -17,5 +17,5 @@ class B extends A
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
|
||||
Strict Standards: Declaration of B::f() should be compatible with A::f($x) in %sinheritance_003.php on line %d
|
||||
Warning: Declaration of B::f() should be compatible with A::f($x) in %sinheritance_003.php on line %d
|
||||
===DONE===
|
||||
|
||||
@@ -17,5 +17,5 @@ class B extends A
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
|
||||
Strict Standards: Declaration of B::f() should be compatible with A::f() in %sinheritance_004.php on line %d
|
||||
Warning: Declaration of B::f() should be compatible with A::f() in %sinheritance_004.php on line %d
|
||||
===DONE===
|
||||
|
||||
@@ -28,6 +28,6 @@ $b->foo(1);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of C::foo() should be compatible with A::foo($arg1 = 1) in %s on line %d
|
||||
Warning: Declaration of C::foo() should be compatible with A::foo($arg1 = 1) in %s on line %d
|
||||
int(1)
|
||||
int(3)
|
||||
|
||||
@@ -18,5 +18,5 @@ $b->foo();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of B::foo() should be compatible with A::foo($arg = 1) in %s on line %d
|
||||
Warning: Declaration of B::foo() should be compatible with A::foo($arg = 1) in %s on line %d
|
||||
foo
|
||||
|
||||
@@ -30,17 +30,17 @@ var_dump(isset($c->y));
|
||||
--> Access visible static prop like instance prop:
|
||||
bool(false)
|
||||
|
||||
Strict Standards: Accessing static property C::$x as non static in %s on line 11
|
||||
Notice: Accessing static property C::$x as non static in %s on line 11
|
||||
|
||||
Strict Standards: Accessing static property C::$x as non static in %s on line 12
|
||||
Notice: Accessing static property C::$x as non static in %s on line 12
|
||||
|
||||
Notice: Undefined property: C::$x in %s on line 12
|
||||
|
||||
Strict Standards: Accessing static property C::$x as non static in %s on line 13
|
||||
Notice: Accessing static property C::$x as non static in %s on line 13
|
||||
|
||||
Strict Standards: Accessing static property C::$x as non static in %s on line 15
|
||||
Notice: Accessing static property C::$x as non static in %s on line 15
|
||||
|
||||
Strict Standards: Accessing static property C::$x as non static in %s on line 16
|
||||
Notice: Accessing static property C::$x as non static in %s on line 16
|
||||
%unicode|string%(3) "ref"
|
||||
%unicode|string%(5) "C::$x"
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Class D2 extends C { function f(SomeClass $a) {} }
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of D2::f() should be compatible with C::f(array $a) in %s on line 8
|
||||
Warning: Declaration of D2::f() should be compatible with C::f(array $a) in %s on line 8
|
||||
Compatible hint.
|
||||
Class hint, should be array.
|
||||
==DONE==
|
||||
|
||||
@@ -9,6 +9,6 @@ Class D extends C { function f($a) {} }
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of D::f() should be compatible with C::f(array $a) in %s on line 5
|
||||
Warning: Declaration of D::f() should be compatible with C::f(array $a) in %s on line 5
|
||||
No hint, should be array.
|
||||
==DONE==
|
||||
|
||||
@@ -9,6 +9,6 @@ Class D extends C { function f(array $a) {} }
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of D::f() should be compatible with C::f(SomeClass $a) in %s on line 5
|
||||
Warning: Declaration of D::f() should be compatible with C::f(SomeClass $a) in %s on line 5
|
||||
Array hint, should be class.
|
||||
==DONE==
|
||||
|
||||
@@ -9,6 +9,6 @@ Class D extends C { function f(array $a) {} }
|
||||
?>
|
||||
==DONE==
|
||||
--EXPECTF--
|
||||
Strict Standards: Declaration of D::f() should be compatible with C::f($a) in %s on line 5
|
||||
Warning: Declaration of D::f() should be compatible with C::f($a) in %s on line 5
|
||||
Array hint, should be nothing.
|
||||
==DONE==
|
||||
|
||||
@@ -146,7 +146,7 @@ foo:1
|
||||
bar_static()
|
||||
bar_global()
|
||||
|
||||
Strict Standards: Only variables should be assigned by reference in %sbug20175.php on line 47
|
||||
Notice: Only variables should be assigned by reference in %sbug20175.php on line 47
|
||||
bar:1
|
||||
bar_static()
|
||||
bar:1
|
||||
|
||||
@@ -26,13 +26,13 @@ function fubar($text){
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 4
|
||||
Notice: Only variables should be assigned by reference in %sbug21600.php on line 4
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
string(4) "test"
|
||||
}
|
||||
|
||||
Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 11
|
||||
Notice: Only variables should be assigned by reference in %sbug21600.php on line 11
|
||||
array(1) {
|
||||
["foo"]=>
|
||||
string(4) "test"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
--TEST--
|
||||
Bug #23384 (use of class constants in statics)
|
||||
--INI--
|
||||
error_reporting=4095
|
||||
--FILE--
|
||||
<?php
|
||||
define('TEN', 10);
|
||||
@@ -21,7 +19,7 @@ Foo::test();
|
||||
echo Foo::HUN."\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Non-static method Foo::test() should not be called statically in %sbug23384.php on line %d
|
||||
Deprecated: Non-static method Foo::test() should not be called statically in %sbug23384.php on line %d
|
||||
Array
|
||||
(
|
||||
[100] => ten
|
||||
|
||||
@@ -17,5 +17,5 @@ foo(bar(5));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
Strict Standards: Only variables should be passed by reference in %s on line 13
|
||||
Notice: Only variables should be passed by reference in %s on line 13
|
||||
int(5)
|
||||
|
||||
@@ -179,17 +179,17 @@ string(12) "Ref2 changed"
|
||||
|
||||
---- Pass by ref / pass by val: static method calls ----
|
||||
|
||||
Strict Standards: Non-static method C::v() should not be called statically in %s on line 95
|
||||
Deprecated: Non-static method C::v() should not be called statically in %s on line 95
|
||||
|
||||
Notice: Undefined variable: u1 in %s on line 95
|
||||
|
||||
Strict Standards: Non-static method C::r() should not be called statically in %s on line 96
|
||||
Deprecated: Non-static method C::r() should not be called statically in %s on line 96
|
||||
|
||||
Notice: Undefined variable: u1 in %s on line 97
|
||||
NULL
|
||||
string(11) "Ref changed"
|
||||
|
||||
Strict Standards: Non-static method C::vv() should not be called statically in %s on line 100
|
||||
Deprecated: Non-static method C::vv() should not be called statically in %s on line 100
|
||||
|
||||
Notice: Undefined variable: u1 in %s on line 100
|
||||
|
||||
@@ -201,7 +201,7 @@ Notice: Undefined variable: u2 in %s on line 101
|
||||
NULL
|
||||
NULL
|
||||
|
||||
Strict Standards: Non-static method C::vr() should not be called statically in %s on line 104
|
||||
Deprecated: Non-static method C::vr() should not be called statically in %s on line 104
|
||||
|
||||
Notice: Undefined variable: u1 in %s on line 104
|
||||
|
||||
@@ -209,7 +209,7 @@ Notice: Undefined variable: u1 in %s on line 105
|
||||
NULL
|
||||
string(11) "Ref changed"
|
||||
|
||||
Strict Standards: Non-static method C::rv() should not be called statically in %s on line 108
|
||||
Deprecated: Non-static method C::rv() should not be called statically in %s on line 108
|
||||
|
||||
Notice: Undefined variable: u2 in %s on line 108
|
||||
|
||||
@@ -217,7 +217,7 @@ Notice: Undefined variable: u2 in %s on line 109
|
||||
string(11) "Ref changed"
|
||||
NULL
|
||||
|
||||
Strict Standards: Non-static method C::rr() should not be called statically in %s on line 112
|
||||
Deprecated: Non-static method C::rr() should not be called statically in %s on line 112
|
||||
string(12) "Ref1 changed"
|
||||
string(12) "Ref2 changed"
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ object(stdClass)#%d (1) {
|
||||
|
||||
---- Pass uninitialised arrays & objects by ref: static method call ---
|
||||
|
||||
Strict Standards: Non-static method C::refs() should not be called statically in %s on line 39
|
||||
Deprecated: Non-static method C::refs() should not be called statically in %s on line 39
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(12) "Ref1 changed"
|
||||
|
||||
@@ -79,7 +79,7 @@ var_dump($a);
|
||||
--EXPECTF--
|
||||
Pass a function call that returns a value:
|
||||
|
||||
Strict Standards: Only variables should be passed by reference in %s on line 44
|
||||
Notice: Only variables should be passed by reference in %s on line 44
|
||||
string(8) "original"
|
||||
string(8) "original"
|
||||
Pass a function call that returns a reference:
|
||||
@@ -88,7 +88,7 @@ string(7) "changed"
|
||||
|
||||
Pass a static method call that returns a value:
|
||||
|
||||
Strict Standards: Only variables should be passed by reference in %s on line 55
|
||||
Notice: Only variables should be passed by reference in %s on line 55
|
||||
string(8) "original"
|
||||
string(8) "original"
|
||||
Pass a static method call that returns a reference:
|
||||
@@ -97,7 +97,7 @@ string(7) "changed"
|
||||
|
||||
Pass a method call that returns a value:
|
||||
|
||||
Strict Standards: Only variables should be passed by reference in %s on line 67
|
||||
Notice: Only variables should be passed by reference in %s on line 67
|
||||
string(8) "original"
|
||||
string(8) "original"
|
||||
Pass a method call that returns a reference:
|
||||
|
||||
@@ -37,14 +37,14 @@ var_dump($a);
|
||||
|
||||
---> Pass constant assignment by reference:
|
||||
|
||||
Strict Standards: Only variables should be passed by reference in %s on line 9
|
||||
Notice: Only variables should be passed by reference in %s on line 9
|
||||
string(10) "a.original"
|
||||
string(10) "a.original"
|
||||
|
||||
|
||||
---> Pass variable assignment by reference:
|
||||
|
||||
Strict Standards: Only variables should be passed by reference in %s on line 15
|
||||
Notice: Only variables should be passed by reference in %s on line 15
|
||||
string(10) "a.original"
|
||||
string(10) "a.original"
|
||||
|
||||
@@ -56,6 +56,6 @@ string(9) "a.changed"
|
||||
|
||||
---> Pass concat assignment by reference:
|
||||
|
||||
Strict Standards: Only variables should be passed by reference in %s on line 28
|
||||
Notice: Only variables should be passed by reference in %s on line 28
|
||||
string(20) "b.originala.original"
|
||||
string(10) "a.original"
|
||||
|
||||
@@ -17,9 +17,9 @@ var_dump(array_shift(array_shift($stack)));
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
Strict Standards: Only variables should be passed by reference in %s on line %d
|
||||
Notice: Only variables should be passed by reference in %s on line %d
|
||||
string(3) "two"
|
||||
|
||||
Strict Standards: Only variables should be passed by reference in %s on line %d
|
||||
Notice: Only variables should be passed by reference in %s on line %d
|
||||
string(3) "one"
|
||||
===DONE===
|
||||
|
||||
@@ -24,6 +24,6 @@ var_dump($a); //expecting "changed"
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Strict Standards: Only variables should be assigned by reference in %s on line 13
|
||||
Notice: Only variables should be assigned by reference in %s on line 13
|
||||
string(8) "original"
|
||||
string(7) "changed"
|
||||
|
||||
@@ -40,7 +40,7 @@ var_dump($a, $b);
|
||||
|
||||
---> 1. Trying to assign by reference the return value of a function that returns by value:
|
||||
|
||||
Strict Standards: Only variables should be assigned by reference in %s on line 17
|
||||
Notice: Only variables should be assigned by reference in %s on line 17
|
||||
int(5)
|
||||
int(100)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ var_dump($a, $b);
|
||||
|
||||
---> 1. Trying to assign by reference the return value of a function that returns by value:
|
||||
|
||||
Strict Standards: Only variables should be assigned by reference in %s on line 19
|
||||
Notice: Only variables should be assigned by reference in %s on line 19
|
||||
int(5)
|
||||
int(100)
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ var_dump($a, $b);
|
||||
|
||||
---> 1. Trying to assign by reference the return value of a function that returns by value:
|
||||
|
||||
Strict Standards: Only variables should be assigned by reference in %s on line 20
|
||||
Notice: Only variables should be assigned by reference in %s on line 20
|
||||
int(5)
|
||||
int(100)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user