mirror of
https://github.com/php/php-src.git
synced 2025-01-18 09:43:36 +08:00
add testcase for bug #29446
This commit is contained in:
parent
0bc0ccce2b
commit
663e46eee5
19
tests/classes/bug29446.phpt
Normal file
19
tests/classes/bug29446.phpt
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user