mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
17 lines
343 B
PHP
17 lines
343 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
|