|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-11 11:09 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 22:00:01 2025 UTC |
Description: ------------ when calling the get_class_vars function on an object, the __autoload function is called with an argument equal to "object". So this sums up that __autoload is in two cases: 1- when using the New operator. (correct) 2- when using the get_class_vars (?????) Reproduce code: --------------- <?php $c = new CircleObject("Circle1"); echo "------\n"; $arr = get_class_vars($c); echo "------\n"; function __autoload($class) { echo("auto loading [".$class."]\n"); switch ($class) { case "circleobject": require_once ("$class.php"); break; } } ?> Expected result: ---------------- Content-type: text/html X-Powered-By: PHP/5.0.0b1 auto loading [circleobject] ------ ------ Actual result: -------------- Content-type: text/html X-Powered-By: PHP/5.0.0b1 auto loading [circleobject] ------ auto loading [object] ------