3v4l.org

run code in 300+ PHP versions simultaneously
<?php function arrayTest($key) { print_r(func_get_args()); return '1' + $key; } $arr = array('a', 'b', 'c', 'd'); $arrTwo = array_map('arrayTest', $arr); print_r($arr); print_r($arrTwo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JFPFD
function name:  (null)
number of ops:  13
compiled vars:  !0 = $arr, !1 = $arrTwo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'array_map'
          2        SEND_VAL                                                 'arrayTest'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   14     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   15     9        INIT_FCALL                                               'print_r'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function arraytest:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JFPFD
function name:  arrayTest
number of ops:  8
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'print_r'
          2        FUNC_GET_ARGS                                    ~1      
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    7     5        ADD                                              ~3      '1', !0
          6      > RETURN                                                   ~3
    8     7*     > RETURN                                                   null

End of function arraytest

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.63 ms | 1395 KiB | 17 Q