3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ static $variable = array('func' => 'Foo::secondFunction'); public static function firstFunction(){ return "PHP 5.6!"; } public static function secondFunction(){ return "PHP 7!"; } } $variable = array('func' => 'firstFunction'); echo Foo::$variable['func']();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pFhPY
function name:  (null)
number of ops:  7
compiled vars:  !0 = $variable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, <array>
   19     1        FETCH_STATIC_PROP_R          unknown             ~2      'variable'
          2        FETCH_DIM_R                                      ~3      ~2, 'func'
          3        INIT_DYNAMIC_CALL                                        ~3
          4        DO_FCALL                                      0  $4      
          5        ECHO                                                     $4
          6      > RETURN                                                   1

Class Foo:
Function firstfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pFhPY
function name:  firstFunction
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   'PHP+5.6%21'
    9     1*     > RETURN                                                   null

End of function firstfunction

Function secondfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pFhPY
function name:  secondFunction
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                   'PHP+7%21'
   13     1*     > RETURN                                                   null

End of function secondfunction

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.22 ms | 1393 KiB | 13 Q