#46177 [Opn->Bgs]: Require is triggering autoload function
ID: 46177
Updated by: johannes@php.net
Reported By: Antoniocs at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Dynamic loading
Operating System: windows XP sp3
PHP Version: 5.2.6
New Comment:
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
The engine tries to bind the class emmbers and has to check the parent
class for missing implementation of abstract elements and therelike.
That's expected
Previous Comments:
------------------------------------------------------------------------
[2008-09-25 23:12:11] Antoniocs at gmail dot com
Description:
------------
Require triggers __autoload
Reproduce code:
---------------
File teste.php
<?php
class teste extends acs_activerecord {
public function __construct() {
parent::__construct();
}
}
?>
File other.php
require("teste.php");
This will trigger my autoload function (which is declared and included,
but not shown here), which will try to load the file where the
acs_activerecord is
Expected result:
----------------
I would expect it not to trigger the autoload function.
The autoload function should be triggered when I instantiate the class
teste
Actual result:
--------------
I have xdedub and the cachegrind shows the autoload function being
called when the file teste.php is required
http://img142.imageshack.us/img142/2047/loadproblemug6.jpg
Here is a link to the image of the cachegrind file.I have placed a
little arrow indicating the file
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46177&edit=1
Thread (2 messages)