3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static function test() { echo 'Ok!<br>'; } } define('CONFIG', [ Foo::test(), 'ok!' ]); var_dump(CONFIG[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DFSJ2
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'CONFIG'
   12     2        INIT_STATIC_METHOD_CALL                                  'Foo', 'test'
          3        DO_FCALL                                      0  $0      
          4        INIT_ARRAY                                       ~1      $0
   13     5        ADD_ARRAY_ELEMENT                                ~1      'ok%21'
          6        SEND_VAL                                                 ~1
          7        DO_ICALL                                                 
   16     8        INIT_FCALL                                               'var_dump'
          9        FETCH_CONSTANT                                   ~3      'CONFIG'
         10        FETCH_DIM_R                                      ~4      ~3, 0
         11        SEND_VAL                                                 ~4
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DFSJ2
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'Ok%21%3Cbr%3E'
    8     1      > RETURN                                                   null

End of function test

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.47 ms | 1399 KiB | 17 Q