Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:476 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89779 invoked from network); 29 Mar 2003 20:38:35 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 29 Mar 2003 20:38:35 -0000 Received: from jdi.jdimedia.nl (jdi.jdimedia.nl [212.204.192.51]) by jdi.jdimedia.nl (8.12.4/8.12.4) with ESMTP id h2TKcU3A001467; Sat, 29 Mar 2003 21:38:34 +0100 Date: Sat, 29 Mar 2003 21:38:30 +0100 (CET) X-X-Sender: derick@jdi.jdimedia.nl To: engine2@lists.zend.com cc: PHP Developers Mailing List Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Wrong code generate with -e mode From: d.rethans@jdimedia.nl (Derick Rethans) Hello, I encountered a weird bug that I cant quite figure out. It has to do with the extended-info mode (-m) of PHP. problem: the opcodes generated in extended-info mode are incorrect testscript: php configure: ./configure --disable-all output with 'php testscript.php': tests output with 'php -e testscript.php':
Fatal error: Undefined class constant 'quote' in /dat/dev/php/tests/testscript.php on line 8
/dat/dev/php/tests/testscript.php(8) : Fatal error - Undefined class constant 'quote' generated opcodes with 'php': line # op fetch ext operands ------------------------------------------------------------------------------- 2 0 ZEND_DECLARE_CLASS null, '%00dbhelper%2Fdat%2Fdev%2Fphp%2Fxdebug%2Ftests%2Ftest9.php2', 'dbhelper' 6 1 ZEND_VERIFY_ABSTRACT_CLASS null, 8 2 ZEND_FETCH_CLASS null, , 'dbhelper' 3 ZEND_INIT_STATIC_METHOD_CALL ~72, null, 'quote' 4 SEND_VAL 'tests' 5 DO_FCALL_BY_NAME 1 $108, , -1 6 ECHO $108 10 7 RETURN 1 generated opcodes with 'php -e': line # op fetch ext operands ------------------------------------------------------------------------------- 2 0 EXT_STMT 1 ZEND_DECLARE_CLASS null, '%00dbhelper%2Fdat%2Fdev%2Fphp%2Fxdebug%2Ftests%2Ftest9.php2', 'dbhelper' 6 2 ZEND_VERIFY_ABSTRACT_CLASS null, 8 3 EXT_STMT 4 ZEND_FETCH_CLASS null, , 'dbhelper' 5 FETCH_CONSTANT ~72, null 6 ZEND_INIT_STATIC_METHOD_CALL 7 SEND_VAL 'tests' 8 DO_FCALL_BY_NAME 1 $108, , -1 9 EXT_FCALL_END 10 ECHO $108 10 11 EXT_STMT 12 RETURN 1 As you can see there is no EXT_FCALL_BEGIN, and there is a FETCH_CONSTANT added (which causes the error message). I've no clue why, Andrei can not reproduce it, Timm can. regards, Derick -- ------------------------------------------------------------------------- Derick Rethans http://derickrethans.nl/ JDI Media Solutions http://www.jdimedia.nl/ PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ -------------------------------------------------------------------------