3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = "1,2,3"; $b = explode(',',$a); $c = array_reduce($b, function(&$result, $d) { return $result.=' cat-'.$d;});
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/itSCA
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '1%2C2%2C3'
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    4     6        INIT_FCALL                                               'array_reduce'
          7        SEND_VAR                                                 !1
          8        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FitSCA%3A4%240'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FitSCA%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/itSCA
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $result, !1 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        CONCAT                                           ~2      '+cat-', !1
          3        ASSIGN_OP                                     8  ~3      !0, ~2
          4      > RETURN                                                   ~3
          5*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.07 ms | 1395 KiB | 17 Q