diff options
-rw-r--r-- | tests/basic/bug51709_1.phpt | 16 | ||||
-rw-r--r-- | tests/basic/bug51709_2.phpt | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/tests/basic/bug51709_1.phpt b/tests/basic/bug51709_1.phpt new file mode 100644 index 0000000000..e929df3844 --- /dev/null +++ b/tests/basic/bug51709_1.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #51709 (Can't use keywords as method names) +--FILE-- +<?php + +class foo { + static function for() { + echo "1"; + } +} + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +Parse error: syntax error, unexpected T_FOR, expecting T_STRING in %s/bug51709_1.php on line %d diff --git a/tests/basic/bug51709_2.phpt b/tests/basic/bug51709_2.phpt new file mode 100644 index 0000000000..b6224abcf7 --- /dev/null +++ b/tests/basic/bug51709_2.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #51709 (Can't use keywords as method names) +--FILE-- +<?php + +class foo { + static function goto() { + echo "1"; + } +} + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +Parse error: syntax error, unexpected T_GOTO, expecting T_STRING in %s/bug51709_2.php on line %d |