From:             laruence
Operating system: 
PHP version:      trunk-SVN-2011-09-14 (SVN)
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:Compiler create unused opline(NOP)

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 bug report at https://bugs.php.net/bug.php?id=55695&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=55695&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=55695&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=55695&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=55695&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=55695&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=55695&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=55695&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=55695&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=55695&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=55695&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=55695&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=55695&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=55695&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=55695&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=55695&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=55695&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=55695&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=55695&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=55695&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=55695&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=55695&r=mysqlcfg

Reply via email to