php-src/Zend/tests/026.phpt

26 lines
380 B
Plaintext
Raw Normal View History

2008-04-18 21:54:46 +08:00
--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 'a' of non-object in %s on line %d
2008-04-18 21:54:46 +08:00
ok
Warning: Creating default object from empty value in %s on line %d
2008-04-18 21:54:46 +08:00
ok