3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = ["a", "b", "c", "d", "e"]; var_export( array_reduce( $x, function($result, $v) { $result[] = $v; return $result; }, $x ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BDUV1
function name:  (null)
number of ops:  11
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'var_export'
    6     2        INIT_FCALL                                               'array_reduce'
    7     3        SEND_VAR                                                 !0
    8     4        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   11     5        SEND_VAL                                                 ~2
   12     6        SEND_VAR                                                 !0
    6     7        DO_ICALL                                         $3      
   12     8        SEND_VAR                                                 $3
    5     9        DO_ICALL                                                 
   14    10      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BDUV1
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $result, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        ASSIGN_DIM                                               !0
          3        OP_DATA                                                  !1
   10     4      > RETURN                                                   !0
   11     5*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.45 ms | 1005 KiB | 15 Q