3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = array(4,6,2,22,11); sort($numbers); function printArray($nums) { array_reduce($nums, function ($carry, $item) { echo $carry .= $item . "<br>"; }); } printArray($numbers);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4JJFL
function name:  (null)
number of ops:  8
compiled vars:  !0 = $numbers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'sort'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
   12     4        INIT_FCALL                                               'printarray'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function printarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4JJFL
function name:  printArray
number of ops:  7
compiled vars:  !0 = $nums
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'array_reduce'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
    9     4        SEND_VAL                                                 ~1
    7     5        DO_ICALL                                                 
   10     6      > RETURN                                                   null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4JJFL
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $carry, !1 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        CONCAT                                           ~2      !1, '%3Cbr%3E'
          3        ASSIGN_OP                                     8  ~3      !0, ~2
          4        ECHO                                                     ~3
    9     5      > RETURN                                                   null

End of Dynamic Function 0

End of function printarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.8 ms | 1008 KiB | 16 Q