Edit report at https://bugs.php.net/bug.php?id=55695&edit=1
ID: 55695 Updated by: larue...@php.net Reported by: larue...@php.net Summary: Compiler create unused opline(NOP) Status: Open Type: Bug Package: Scripting Engine problem PHP Version: trunk-SVN-2011-09-14 (SVN) -Assigned To: +Assigned To: dmitry Block user comment: N Private report: N New Comment: Dmitry, as I said in #55673, sorry for that mis-fix, heh, anyway, I report this to you, you can mark simply it as won't fix :) Previous Comments: ------------------------------------------------------------------------ [2011-09-14 15:32:52] larue...@php.net The following patch has been added/updated: Patch Name: bug55695.diff Revision: 1316014372 URL: https://bugs.php.net/patch-display.php?bug=55695&patch=bug55695.diff&revision=1316014372 ------------------------------------------------------------------------ [2011-09-14 15:32:17] larue...@php.net Description: ------------ When having the following code: <?php class foo { function bar() { self::$bar = 42; } } ?> The compiler generates compiled a totally unused NOP opline: $ php -dvld.active=1 -r 'class foo { function bar() { self::$bar = 42; } }' Finding entry points Branch analysis from position: 0 Return found filename: Command line code function name: (null) number of ops: 2 compiled vars: none line # * op fetch ext return operands --------------------------------------------------------------------------------- 1 0 > NOP 1 > RETURN null branch: # 0; line: 1- 1; sop: 0; eop: 1 path #1: 0, Class foo: Function bar: Finding entry points Branch analysis from position: 0 Return found filename: Command line code function name: bar number of ops: 4 compiled vars: !0 = $bar line # * op fetch ext return operands --------------------------------------------------------------------------------- 0 > ZEND_FETCH_CLASS 1 1 FETCH_W static member $1 'bar' 2 ASSIGN $1, 42 3 > RETURN null branch: # 0; line: 1- 1; sop: 0; eop: 3 path #1: 0, End of function bar. Test script: --------------- no ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55695&edit=1