php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18540 Overload "extension" does not work
Submitted: 2002-07-24 11:11 UTC Modified: 2002-09-26 10:55 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: paulo at isnet dot com dot br Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.3.0-DEV with Zend2 OS: Windows
Private report: No CVE-ID: None
 [2002-07-24 11:11 UTC] paulo at isnet dot com dot br
The overload extension is enabled by default on PHP-4.3.0-Dev with Zend2 alpha 1 AND 2 on windows, but the overload() function does not work. At times it crashes Apache, other times it gives a message like 'too many nested levels'.

class test {}
overload('test'); // <== Crashes PHP

I guess it happens because of the new way PHP handles objects - we no longer need to call $this->function(), so how would the overloaded class decide wich function or property to work with?

Also, when overloading methods only the first function call is overloaded. When an overloaded function is called from within another one, it is not found. I think this behavior is fine for properties, but it limits the use of the extension when using overloaded methods. (should this be in another bug report or feature wish list?)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-26 10:55 UTC] wez@php.net
This functionality is now built directly into ZE2.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Feb 21 21:00:02 2026 UTC