<?php
trait foo { }
class bar {
use foo;
}
print_r(class_uses(new bar));
print_r(class_uses('bar'));
function __autoload($class_name) {
require_once $class_name . '.php';
}
// use __autoload to load the 'not_loaded' class
print_r(class_uses('not_loaded', true));
?>
Fatal error: __autoload() is no longer supported, use spl_autoload_register() instead in /in/dD0WN on line 12
Process exited with code 255.
Output for 7.4.33
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /in/dD0WN on line 12
Array
(
[foo] => foo
)
Array
(
[foo] => foo
)
Warning: require_once(not_loaded.php): failed to open stream: No such file or directory in /in/dD0WN on line 13
Fatal error: require_once(): Failed opening required 'not_loaded.php' (include_path='.:') in /in/dD0WN on line 13
Process exited with code 255.
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /in/dD0WN on line 12
Array
(
[foo] => foo
)
Array
(
[foo] => foo
)
Warning: require_once(): open_basedir restriction in effect. File(not_loaded.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/dD0WN on line 13
Warning: require_once(not_loaded.php): failed to open stream: Operation not permitted in /in/dD0WN on line 13
Fatal error: require_once(): Failed opening required 'not_loaded.php' (include_path='.:') in /in/dD0WN on line 13
Process exited with code 255.
Array
(
[foo] => foo
)
Array
(
[foo] => foo
)
Warning: require_once(not_loaded.php): failed to open stream: No such file or directory in /in/dD0WN on line 13
Fatal error: require_once(): Failed opening required 'not_loaded.php' (include_path='.:') in /in/dD0WN on line 13
Process exited with code 255.
Output for 7.1.25 - 7.1.33
Array
(
[foo] => foo
)
Array
(
[foo] => foo
)
Warning: require_once(): open_basedir restriction in effect. File(not_loaded.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/dD0WN on line 13
Warning: require_once(not_loaded.php): failed to open stream: Operation not permitted in /in/dD0WN on line 13
Fatal error: require_once(): Failed opening required 'not_loaded.php' (include_path='.:') in /in/dD0WN on line 13
Process exited with code 255.
Output for 7.1.20
Array
(
[foo] => foo
)
Array
(
[foo] => foo
)
Warning: require_once(): open_basedir restriction in effect. File(not_loaded.php) is not within the allowed path(s): (/tmp:/in) in /in/dD0WN on line 13
Warning: require_once(not_loaded.php): failed to open stream: Operation not permitted in /in/dD0WN on line 13
Fatal error: require_once(): Failed opening required 'not_loaded.php' (include_path='.:') in /in/dD0WN on line 13
Process exited with code 255.