Edit report at http://bugs.php.net/bug.php?id=53414&edit=1
ID: 53414 User updated by: mv28jam at gmail dot com Reported by: mv28jam at gmail dot com -Summary: static class property __autoload problem +Summary: autoload problem in class destructor Status: Open Type: Bug Package: Class/Object related Operating System: WindowsXP/Linux Fedora PHP Version: 5.2.14 Block user comment: N Private report: N New Comment: rename Previous Comments: ------------------------------------------------------------------------ [2010-11-26 14:27:19] mv28jam at gmail dot com Description: ------------ __autoload does not works in class destructor when path in autoload is relative Test script: --------------- function __autoload($class_name){ $res=include_once('./'.$class_name.'.class.php'); } class Test1{ public function __destruct(){ $obj = new Test2; } } $test= new Test1; //other file class Test2{} Expected result: ---------------- class autoload Actual result: -------------- on windows Warning: include_once(./Test2.class.php) [function.include-once]: failed to open stream: No such file or directory in C:\VertrigoServ\www\index.php on line 3 same on Fedora ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53414&edit=1