3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class SomeClass { public $_someMember; public function __construct() { $this->_someMember = 1; } public static function getSomethingStatic() { $object = new self(); return $object->_someMember * 5; // here's the catch } } echo SomeClass::getSomethingStatic();
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/IHDnX
function name:  (null)
number of ops:  5
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  19     1        INIT_STATIC_METHOD_CALL                                  'SomeClass', 'getSomethingStatic'
         2        DO_FCALL                                      0  $1      
         3        ECHO                                                     $1
         4      > RETURN                                                   1

Class SomeClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/IHDnX
function name:  __construct
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   9     0  E >   ASSIGN_OBJ                                               '_someMember'
         1        OP_DATA                                                  1
  10     2      > RETURN                                                   null

End of function __construct

Function getsomethingstatic:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/IHDnX
function name:  getSomethingStatic
number of ops:  8
compiled vars:  !0 = $object
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  14     0  E >   FETCH_CLASS                                 513  :1      
         1        NEW                                              $2      :1
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $2
  15     4        FETCH_OBJ_R                                      $5      !0, '_someMember'
         5        MUL                                              ~6      $5, 5
         6      > RETURN                                                   ~6
  16     7*     > RETURN                                                   null

End of function getsomethingstatic

End of class SomeClass.

Generated using Vulcan Logic Dumper, using php 7.3.0