#24602 [Opn->Bgs]: get_class_vars

From: Date: Fri, 11 Jul 2003 16:09:23 +0000
Subject: #24602 [Opn->Bgs]: get_class_vars
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-43766@lists.php.net to get a copy of this message
 ID:               24602
 Updated by:       sniper@php.net
 Reported By:      rasaliba at kyube dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Zend Engine 2 problem
-Operating System: Win 2000
+Operating System: *
 PHP Version:      5.0.0b1 (beta1)
 New Comment:

Try putting 'error_reporting(E_ALL);' in your script..



Previous Comments:
------------------------------------------------------------------------

[2003-07-11 06:58:52] rasaliba at kyube dot com

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]
------


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24602&edit=1



Thread (2 messages)

« previous php.bugs (#43766) next »