diff options
author | Antony Dovgal <tony2001@php.net> | 2004-09-10 13:55:26 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2004-09-10 13:55:26 +0000 |
commit | 663e46eee5909d0f1d68223122c8455e36e583e9 (patch) | |
tree | 253eb424caa5ffd5c246a11e0a8b344cb15460e2 /tests | |
parent | 0bc0ccce2b858673f59d0cb90f5bf0d037683e1f (diff) | |
download | php-git-663e46eee5909d0f1d68223122c8455e36e583e9.tar.gz |
add testcase for bug #29446
Diffstat (limited to 'tests')
-rw-r--r-- | tests/classes/bug29446.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/classes/bug29446.phpt b/tests/classes/bug29446.phpt new file mode 100644 index 0000000000..5e30e8e74b --- /dev/null +++ b/tests/classes/bug29446.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #29446 (ZE allows multiple declarations of the same class constant) +--FILE-- +<?php + +class testClass { + const TEST_CONST = 'test'; + const TEST_CONST = 'test1'; + + function testClass() { + echo self::TEST_CONST; + } +} + +$test = new testClass; + +?> +--EXPECTF-- +Fatal error: Cannot redefine class constant testClass::TEST_CONST in %s on line 5
\ No newline at end of file |