3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = array(array( 'bar' => function($baz) { var_export($baz); return function() { echo 'hi'; }; } )); $foo[0]['bar']('baz')();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aBncv
function name:  (null)
number of ops:  12
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaBncv%3A4%240'
    9     1        INIT_ARRAY                                       ~2      ~1, 'bar'
          2        INIT_ARRAY                                       ~3      ~2
    3     3        ASSIGN                                                   !0, ~3
   12     4        FETCH_DIM_R                                      ~5      !0, 0
          5        FETCH_DIM_R                                      ~6      ~5, 'bar'
          6        INIT_DYNAMIC_CALL                                        ~6
          7        SEND_VAL_EX                                              'baz'
          8        DO_FCALL                                      0  $7      
          9        INIT_DYNAMIC_CALL                                        $7
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FaBncv%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aBncv
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'var_export'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    6     4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FaBncv%3A6%241'
    8     5      > RETURN                                                   ~2
    9     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FaBncv%3A4%240

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

End of function %00%7Bclosure%7D%2Fin%2FaBncv%3A6%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.59 ms | 1396 KiB | 15 Q