php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48033 Problem in undo magic methods.
Submitted: 2009-04-21 07:21 UTC Modified: 2009-04-21 13:21 UTC
From: php6developer at ya dot ru Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 5.2.9 OS: Ubuntu 8.10 x64
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: php6developer at ya dot ru
New email:
PHP Version: OS:

 

 [2009-04-21 07:21 UTC] php6developer at ya dot ru
Description:
------------
Hi all!

Problem in undo magic methods.

Reproduce code:
---------------
---
From manual page: language.oop5.magic
---
<?php
abstract class Probus_Core_Abstract
{
	protected function __get($sName) {
		echo 'Abstract->__get';
	}
}

// in current class I have unset magic method __get
class Probus_Core_View extends Probus_Core_Abstract
{
}

// create object
$oView = new Probus_Core_View();
// set public dinamical variable
$oView->testvar['num'] = 10;
// print object
var_dump($oView);
?>

Expected result:
----------------
Set variable and no call magic method.

Actual result:
--------------
Print  'Abstract->__get' string and no set variable!

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-21 07:43 UTC] jani@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 [2009-04-21 13:21 UTC] php6developer at ya dot ru
I have not use this magic function in child class. How to remove this magic method only for any child classes?
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Dec 02 01:00:01 2025 UTC