#33826 [NEW]: constructor local method call
| From: | s_g_spencer at yahoo dot co dot uk | Date: | Fri, 22 Jul 2005 16:52:03 +0000 |
| Subject: | #33826 [NEW]: constructor local method call | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-82331@lists.php.net to get a copy of this message | ||
From: s_g_spencer at yahoo dot co dot uk
Operating system: debian linux 2.6.8
PHP version: 5.0.4
PHP Bug Type: Scripting Engine problem
Bug description: constructor local method call
Description:
------------
Cannot call local method from the classes constructor.
I might be wrong in thinking this is a problem. (long day)
Configure line :
./configure \
--with-apxs=/usr/bin/apxs \
--with-libxml-dir=/usr/lib \
--with-curl=/usr/lib \
--with-curlwrappers \
--with-mysql=/usr/lib \
--with-libxml-dir=/usr/lib \
--with-pear=/usr/lib/php \
--with-imap=/usr/include/imap-uw
Reproduce code:
---------------
class foo{
function __construct(){
bar();
}
function bar(){}
}
$example = new foo();
Expected result:
----------------
none. just no error.
Actual result:
--------------
Fatal error: Call to undefined function bar()
--
Edit bug report at http://bugs.php.net/?id=33826&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33826&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33826&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33826&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33826&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33826&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33826&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33826&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33826&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33826&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33826&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33826&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33826&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33826&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33826&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33826&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33826&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33826&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33826&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33826&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33826&r=mysqlcfg