From: Antoniocs at gmail dot com
Operating system: windows XP sp3
PHP version: 5.2.6
PHP Bug Type: Dynamic loading
Bug description: Require is triggering autoload function
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 bug report at http://bugs.php.net/?id=46177&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=46177&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=46177&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=46177&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=46177&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=46177&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=46177&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=46177&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=46177&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=46177&r=support
Expected behavior: http://bugs.php.net/fix.php?id=46177&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=46177&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=46177&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=46177&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46177&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=46177&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=46177&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=46177&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=46177&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=46177&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=46177&r=mysqlcfg