3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'Apple, Orange, Lemone'; var_export( array_reduce( explode(', ', $string), fn($result, $v) => $result + [strtolower($v) => $v], [] ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UAlMk
function name:  (null)
number of ops:  15
compiled vars:  !0 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'Apple%2C+Orange%2C+Lemone'
    4     1        INIT_FCALL                                                   'var_export'
    5     2        INIT_FCALL                                                   'array_reduce'
    6     3        INIT_FCALL                                                   'explode'
          4        SEND_VAL                                                     '%2C+'
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                             $2      
          7        SEND_VAR                                                     $2
    7     8        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
    8     9        SEND_VAL                                                     ~3
    9    10        SEND_VAL                                                     <array>
    5    11        DO_ICALL                                             $4      
    9    12        SEND_VAR                                                     $4
    4    13        DO_ICALL                                                     
   11    14      > 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/UAlMk
function name:  {closure:/in/UAlMk:7}
number of ops:  9
compiled vars:  !0 = $result, !1 = $v
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    8     2        INIT_FCALL                                                   'strtolower'
          3        SEND_VAR                                                     !1
          4        DO_ICALL                                             $2      
          5        INIT_ARRAY                                           ~3      !1, $2
          6        ADD                                                  ~4      !0, ~3
          7      > RETURN                                                       ~4
          8*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.13 ms | 1874 KiB | 16 Q