3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassName { static $variable = array("It's a Wurmple!"); static function pikachu() { return "It's a Pikachu!"; } } $variable = array('pikachu'); echo ClassName::$variable[0], "\n"; echo ClassName::$variable[0](), "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ah2ni
function name:  (null)
number of ops:  12
compiled vars:  !0 = $variable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, <array>
   12     1        FETCH_STATIC_PROP_R          unknown             ~2      'variable'
          2        FETCH_DIM_R                                      ~3      ~2, 0
          3        ECHO                                                     ~3
          4        ECHO                                                     '%0A'
   13     5        FETCH_STATIC_PROP_R          unknown             ~4      'variable'
          6        FETCH_DIM_R                                      ~5      ~4, 0
          7        INIT_DYNAMIC_CALL                                        ~5
          8        DO_FCALL                                      0  $6      
          9        ECHO                                                     $6
         10        ECHO                                                     '%0A'
         11      > RETURN                                                   1

Class ClassName:
Function pikachu:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ah2ni
function name:  pikachu
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'It%27s+a+Pikachu%21'
    7     1*     > RETURN                                                   null

End of function pikachu

End of class ClassName.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.81 ms | 1384 KiB | 13 Q