php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30234 __autoload() not invoked for interfaces
Submitted: 2004-09-25 23:40 UTC Modified: 2004-09-26 20:32 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: sampw at hotmail dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 5.* 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: sampw at hotmail dot com
New email:
PHP Version: OS:

 

 [2004-09-25 23:40 UTC] sampw at hotmail dot com
Description:
------------
__autoload() not invoked for interfaces.

If a class implements an interface, the class is invoked through __autoload(), but the required interface not.

I don't know if it is a bug, but it makes sense to invoke interfaces too. 

For example, if you need persistence objects (Objects in a Session! (A little PHP Application Server :-)), you need __autoload() in order to deserialize an object completly!
(Inorder to include the class definition! Deserialize does only recover the class vars!) Stupid is that you have to know if the recovered object has an interface because you have to include it to ...

Why __autoload() if it does not work with classes which implements interfaces?




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-26 01:04 UTC] chregu@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.

__autload works perfectly on interfaces for me (we use it in our framework), so we really need a reproducing script ..
 [2004-09-26 20:32 UTC] helly@php.net
Look at new tests: 
ext/standard/tests/serialize/bug30234.phpt
tests/classes/006.phpt

both show that __autoload, interfaces and deserializing works perfectly together
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC