3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array(5 => "bar", 6 => "baz"); function testCallback($item, $arg = false) { return $item; } var_dump( array_map("testCallback", $test), array_map("testCallback", $test, array(true)) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/enFeo
function name:  (null)
number of ops:  15
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'var_dump'
   10     2        INIT_FCALL                                               'array_map'
          3        SEND_VAL                                                 'testCallback'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
   11     7        INIT_FCALL                                               'array_map'
          8        SEND_VAL                                                 'testCallback'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 <array>
         11        DO_ICALL                                         $3      
         12        SEND_VAR                                                 $3
         13        DO_ICALL                                                 
   12    14      > RETURN                                                   1

Function testcallback:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/enFeo
function name:  testCallback
number of ops:  4
compiled vars:  !0 = $item, !1 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      <false>
    6     2      > RETURN                                                   !0
    7     3*     > RETURN                                                   null

End of function testcallback

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.62 ms | 1395 KiB | 17 Q