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