2003-12-29 20:36:31 +08:00
|
|
|
--TEST--
|
|
|
|
ZE2 Autoload and derived classes
|
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
|
|
|
if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed');
|
2004-07-26 03:23:17 +08:00
|
|
|
if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
|
2003-12-29 20:36:31 +08:00
|
|
|
?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
function __autoload($class_name)
|
|
|
|
{
|
|
|
|
require_once(dirname(__FILE__) . '/' . $class_name . '.p5c');
|
|
|
|
echo __FUNCTION__ . '(' . $class_name . ")\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
var_dump(class_exists('autoload_derived'));
|
|
|
|
|
|
|
|
?>
|
|
|
|
===DONE===
|
|
|
|
--EXPECT--
|
|
|
|
__autoload(autoload_root)
|
|
|
|
__autoload(autoload_derived)
|
|
|
|
bool(true)
|
|
|
|
===DONE===
|