diff options
Diffstat (limited to 'tests/classes/constants_error_006.phpt')
-rw-r--r-- | tests/classes/constants_error_006.phpt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/classes/constants_error_006.phpt b/tests/classes/constants_error_006.phpt new file mode 100644 index 0000000000..f3f14b867b --- /dev/null +++ b/tests/classes/constants_error_006.phpt @@ -0,0 +1,16 @@ +--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 |