mirror of
https://github.com/php/php-src.git
synced 2024-10-21 00:12:34 +00:00
29 lines
445 B
Plaintext
29 lines
445 B
Plaintext
|
--TEST--
|
||
|
SPL: spl_autoload() and friends
|
||
|
--SKIPIF--
|
||
|
<?php if (!extension_loaded("spl")) print "skip"; ?>
|
||
|
--INI--
|
||
|
include_path=.
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
function my_autoload($name)
|
||
|
{
|
||
|
require $name . '.class.inc';
|
||
|
var_dump(class_exists($name));
|
||
|
}
|
||
|
|
||
|
spl_autoload_register("spl_autoload");
|
||
|
spl_autoload_register("my_autoload");
|
||
|
|
||
|
$obj = new testclass;
|
||
|
|
||
|
?>
|
||
|
===DONE===
|
||
|
<?php exit(0); ?>
|
||
|
--EXPECTF--
|
||
|
%stestclass.inc
|
||
|
%stestclass.class.inc
|
||
|
bool(true)
|
||
|
===DONE===
|