mirror of
https://github.com/php/php-src.git
synced 2024-10-17 06:22:53 +00:00
26 lines
385 B
PHP
26 lines
385 B
PHP
--TEST--
|
|
Trying assign value to property when an object is not returned in a function
|
|
--FILE--
|
|
<?php
|
|
|
|
class foo {
|
|
public function a() {
|
|
}
|
|
}
|
|
|
|
$test = new foo;
|
|
|
|
$test->a()->a;
|
|
print "ok\n";
|
|
|
|
$test->a()->a = 1;
|
|
print "ok\n";
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Notice: Trying to get property of non-object in %s on line %d
|
|
ok
|
|
|
|
Strict Standards: Creating default object from empty value in %s on line %d
|
|
ok
|