|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-01-16 13:20 UTC] sniper@php.net
[2004-01-16 16:06 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 07:00:02 2025 UTC |
Description: ------------ The Reflection classes do not trigger __autoload() when the class is undefined. This works correctly for userland classes. Reproduce code: --------------- function __autoload($c) { class autoload_class { public function __construct() { print "autoload success\n"; } } } Reflection:export(new Reflection_Class('autoload_class')); Expected result: ---------------- autoload success Class [ <user> class autoload_class ] { @@ /Users/adam/Desktop/autoload.php 4-10 - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [1] { Method [ <user> <ctor> public method __construct ] { @@ /Users/adam/Desktop/autoload.php 6 - 8 } } } Actual result: -------------- PHP Fatal error: Uncaught exception 'reflection_exception' with message 'Class autoload_class does not exist' in /Users/adam/Desktop/ autoload.php:10 Stack trace: #0 {main} thrown in /Users/adam/Desktop/autoload.php on line 10