3v4l.org

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

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

End of function myc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.55 ms | 1395 KiB | 19 Q