php-src/Zend/tests/declare_already_in_use.phpt
Nikita Popov d88b212ea6 Improve "already declared" error message
If this error is missing because the rtd_key was renamed to lcname,
fetch the class based on lcname and use the class type and cased
name from there.
2019-09-11 17:04:13 +02:00

15 lines
238 B
PHP

--TEST--
Cannot declare class, because the name is already in use
--FILE--
<?php
function test() {
class A {}
}
test();
test();
?>
--EXPECTF--
Fatal error: Cannot declare class A, because the name is already in use in %s on line %d