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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Tue May 21 19:01:34 2024 UTC