3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); function load($name) { $logger->log[] = array('load', __FILE__, $test); return new $test(); } class foo {} $result = load('foo'); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SiqPs
function name:  (null)
number of ops:  11
compiled vars:  !0 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
   12     3        INIT_FCALL                                               'load'
          4        SEND_VAL                                                 'foo'
          5        DO_FCALL                                      0  $2      
          6        ASSIGN                                                   !0, $2
   13     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function load:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SiqPs
function name:  load
number of ops:  12
compiled vars:  !0 = $name, !1 = $logger, !2 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_ARRAY                                       ~5      'load'
          2        ADD_ARRAY_ELEMENT                                ~5      '%2Fin%2FSiqPs'
          3        ADD_ARRAY_ELEMENT                                ~5      !2
          4        FETCH_OBJ_W                                      $3      !1, 'log'
          5        ASSIGN_DIM                                               $3
          6        OP_DATA                                                  ~5
    7     7        FETCH_CLASS                                   0  $6      !2
          8        NEW                                              $7      $6
          9        DO_FCALL                                      0          
         10      > RETURN                                                   $7
    8    11*     > RETURN                                                   null

End of function load

Class foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.24 ms | 1402 KiB | 18 Q