php-src/Zend/tests/delayed_early_binding_redeclaration.phpt
Ilija Tovilo 1c30c5e707
Print location on class redeclaration
Fixes GH-13950
Closes GH-13999
2024-04-30 14:34:43 +02:00

14 lines
463 B
PHP

--TEST--
Delayed early binding throws class redeclaration error
--EXTENSIONS--
opcache
--FILE--
<?php
class Foo {}
include __DIR__ . '/delayed_early_binding_redeclaration-1.inc';
include __DIR__ . '/delayed_early_binding_redeclaration-2.inc';
var_dump(class_exists(Bar::class));
?>
--EXPECTF--
Fatal error: Cannot redeclare class Bar (previously declared in %sdelayed_early_binding_redeclaration-1.inc:2) in %sdelayed_early_binding_redeclaration-2.inc on line %d