3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DB {} class Cache {} $di = array(); $di['db'] = function() { return new DB(); }; $di['cache'] = function() { return new Cache(); };
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8dndY
function name:  (null)
number of ops:  8
compiled vars:  !0 = $di
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <array>
    7     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F8dndY%3A7%240'
          2        ASSIGN_DIM                                               !0, 'db'
          3        OP_DATA                                                  ~3
    8     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F8dndY%3A8%241'
          5        ASSIGN_DIM                                               !0, 'cache'
          6        OP_DATA                                                  ~5
          7      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F8dndY%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8dndY
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $0      'DB'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F8dndY%3A7%240

Function %00%7Bclosure%7D%2Fin%2F8dndY%3A8%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8dndY
function name:  {closure}
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $0      'Cache'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
          3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F8dndY%3A8%241

Class DB: [no user functions]
Class Cache: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.74 ms | 1394 KiB | 13 Q