php-src/Zend/tests/bug39542.phpt

27 lines
501 B
Plaintext
Raw Normal View History

--TEST--
Bug #39542 (Behaviour of require_once/include_once different to < 5.2.0)
--INI--
error_log=
--FILE--
<?php
$oldcwd = getcwd();
chdir(__DIR__);
if (substr(PHP_OS, 0, 3) == 'WIN') {
2020-02-03 21:52:20 +00:00
set_include_path(__DIR__.'/bug39542;.');
} else {
2020-02-03 21:52:20 +00:00
set_include_path(__DIR__.'/bug39542:.');
}
2017-01-30 21:28:17 +00:00
spl_autoload_register(function ($class) {
if (!require_once($class.'.inc')) {
error_log('Error: Autoload class: '.$class.' not found!');
}
2017-01-30 21:28:17 +00:00
});
new bug39542();
chdir($oldcwd);
?>
--EXPECT--
ok