xref: /PHP-8.1/Zend/tests/bug39542.phpt (revision 691ff9f8)
1--TEST--
2Bug #39542 (Behaviour of require_once/include_once different to < 5.2.0)
3--INI--
4error_log=
5--FILE--
6<?php
7$oldcwd = getcwd();
8chdir(__DIR__);
9if (substr(PHP_OS, 0, 3) == 'WIN') {
10    set_include_path(__DIR__.'/bug39542;.');
11} else {
12    set_include_path(__DIR__.'/bug39542:.');
13}
14
15spl_autoload_register(function ($class) {
16    if (!require_once($class.'.inc')) {
17        error_log('Error: Autoload class: '.$class.' not found!');
18    }
19});
20
21new bug39542();
22
23chdir($oldcwd);
24?>
25--EXPECT--
26ok
27