3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(array('id' => 1),array('id' => 2),array('id' => 3)); function call_function($v){ return $v['id']; } $result = array_map('call_function',$arr); print_R($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8HjQl
function name:  (null)
number of ops:  10
compiled vars:  !0 = $arr, !1 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'array_map'
          2        SEND_VAL                                                 'call_function'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    8     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function call_function:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8HjQl
function name:  call_function
number of ops:  4
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        FETCH_DIM_R                                      ~1      !0, 'id'
          2      > RETURN                                                   ~1
    6     3*     > RETURN                                                   null

End of function call_function

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.45 ms | 1002 KiB | 15 Q