php-src/Zend/tests/strict_002.phpt

28 lines
360 B
Plaintext
Raw Normal View History

2006-05-31 18:47:21 +00:00
--TEST--
assigning static property as non static
--INI--
error_reporting=8191
--FILE--
<?php
2018-09-16 17:16:42 +00:00
class test {
2020-02-03 21:52:20 +00:00
static $foo = 1;
2018-09-16 17:16:42 +00:00
}
2006-05-31 18:47:21 +00:00
2018-09-16 17:16:42 +00:00
$t = new test;
2006-05-31 18:47:21 +00:00
$t->foo = 5;
$fp = fopen(__FILE__, 'r');
var_dump($t);
echo "Done\n";
?>
2018-09-16 17:16:42 +00:00
--EXPECTF--
Notice: Accessing static property test::$foo as non static in %s on line %d
2006-05-31 18:47:21 +00:00
object(test)#%d (1) {
["foo"]=>
int(5)
}
Done