php-src/Zend/tests/strict_002.phpt

28 lines
357 B
Plaintext
Raw Normal View History

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