php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24602 get_class_vars
Submitted: 2003-07-11 06:58 UTC Modified: 2003-07-11 11:09 UTC
From: rasaliba at kyube dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.0.0b1 (beta1) OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rasaliba at kyube dot com
New email:
PHP Version: OS:

 

 [2003-07-11 06:58 UTC] 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]
------

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-11 11:09 UTC] sniper@php.net
Try putting 'error_reporting(E_ALL);' in your script..

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 21 02:01:27 2024 UTC