1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00
Files
archived-php-src/tests/classes/constants_error_006.phpt
Gabriel Caruso 4aabfe911e Revert "Update versions for PHP 8.0.21"
This reverts commit 6eedacdf15.
2022-07-06 12:06:48 +02:00

16 lines
340 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