diff options
author | Márcio Almada <marcio3w@gmail.com> | 2015-03-07 02:29:16 -0300 |
---|---|---|
committer | Márcio Almada <marcio3w@gmail.com> | 2015-04-30 03:03:29 -0300 |
commit | a54e1237ec7d51e063f8bbf7c94241245573dd9e (patch) | |
tree | 96bbeacfc1e505c8f74910eca14a07aa92b08717 /Zend/tests/grammar/regression_004.phpt | |
parent | 972e94a24d46ccabb0b78623c1598c4998c26a76 (diff) | |
download | php-git-a54e1237ec7d51e063f8bbf7c94241245573dd9e.tar.gz |
add tests for semi reserved words and remove obsolete ones
Diffstat (limited to 'Zend/tests/grammar/regression_004.phpt')
-rw-r--r-- | Zend/tests/grammar/regression_004.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Zend/tests/grammar/regression_004.phpt b/Zend/tests/grammar/regression_004.phpt new file mode 100644 index 0000000000..e95674d8c9 --- /dev/null +++ b/Zend/tests/grammar/regression_004.phpt @@ -0,0 +1,15 @@ +--TEST-- +Test possible function naming regression on procedural scope +--FILE-- +<?php + +class Obj +{ + function echo(){} // valid + function return(){} // valid +} + +function echo(){} // not valid + +--EXPECTF-- +Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting identifier (T_STRING) or '(' in %s on line 9 |