3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { static function one() { return static::x; } const x = 1; } $f = array('a', 'one'); var_dump($f());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G42WV
function name:  (null)
number of ops:  7
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'var_dump'
          2        INIT_DYNAMIC_CALL                                        !0
          3        DO_FCALL                                      0  $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Class a:
Function one:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G42WV
function name:  one
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   FETCH_CLASS_CONSTANT                             ~0      'x'
          1      > RETURN                                                   ~0
          2*     > RETURN                                                   null

End of function one

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.47 ms | 1398 KiB | 15 Q