3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array(10,1234,144,2,101,231,213); $out = array_map(function ($v) { return implode('/', str_split($v)) . "/$v.txt"; }, $a); print_r($out);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SQn27
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                          ~3      [0]
    7     3        SEND_VAL                                                 ~3
          4        SEND_VAR                                                 !0
    5     5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    9     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         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/SQn27
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2F'
          3        INIT_FCALL                                               'str_split'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6        SEND_VAR                                                 $1
          7        DO_ICALL                                         $2      
          8        ROPE_INIT                                     3  ~4      '%2F'
          9        ROPE_ADD                                      1  ~4      ~4, !0
         10        ROPE_END                                      2  ~3      ~4, '.txt'
         11        CONCAT                                           ~6      $2, ~3
         12      > RETURN                                                   ~6
    7    13*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.22 ms | 1003 KiB | 17 Q