3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array("apples", "oranges", "plums"); $nu = array_map( "do_something", $array); function do_something($item, $b) { print_r($b); exit; } var_dump($nu); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mllaY
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array, !1 = $nu
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_map'
          2        SEND_VAL                                                 'do_something'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
   10     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   11     9      > RETURN                                                   1

Function do_something:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/mllaY
function name:  do_something
number of ops:  7
compiled vars:  !0 = $item, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        INIT_FCALL                                               'print_r'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                                 
          5      > EXIT                                                     
    8     6*     > RETURN                                                   null

End of function do_something

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.72 ms | 1395 KiB | 19 Q