3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1, 2, 3, 4]; $array2 = [5, 6, 7, 8]; $function = function($array) { if ($array == 1) { $function($array); } return $array; }; var_dump(array_map($function, $array));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HLBv8
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array, !1 = $array2, !2 = $function
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FHLBv8%3A6%240'
          3        ASSIGN                                                   !2, ~5
   14     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'array_map'
          6        SEND_VAR                                                 !2
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $7      
          9        SEND_VAR                                                 $7
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FHLBv8%3A6%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/HLBv8
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $array, !1 = $function
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        IS_EQUAL                                                 !0, 1
          2      > JMPZ                                                     ~2, ->6
    8     3    >   INIT_DYNAMIC_CALL                                        !1
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
   11     6    > > RETURN                                                   !0
   12     7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FHLBv8%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.19 ms | 1399 KiB | 17 Q