1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 05:21:02 +02:00
Files
archived-php-src/tests/classes/constants_error_006.phpt
2018-10-14 12:07:20 -03:00

17 lines
341 B
PHP

--TEST--
Basic class support - attempting to modify a class constant by assignment
--FILE--
<?php
class aclass
{
const myConst = "hello";
}
echo "\nTrying to modify a class constant directly - should be parse error.\n";
aclass::myConst = "no!!";
var_dump(aclass::myConst);
?>
--EXPECTF--
Parse error: %s in %s on line %d