3v4l.org

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

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

End of function cube

Function cube2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KMaCh
function name:  cube2
number of ops:  5
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        MUL                                              ~1      !0, !0
          2        MUL                                              ~2      !0, ~1
          3        ECHO                                                     ~2
   11     4      > RETURN                                                   null

End of function cube2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.96 ms | 1396 KiB | 19 Q