3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($a){ $c = []; foreach ($a as $b){$c[]=$b*$b;} return $c; } $a = range(1,1e4); $d = test($a); print 'done';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EUsqe
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 10000
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
   10     5        INIT_FCALL                                               'test'
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0  $4      
          8        ASSIGN                                                   !1, $4
   12     9        ECHO                                                     'done'
         10      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/EUsqe
function name:  test
number of ops:  11
compiled vars:  !0 = $a, !1 = $c, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, <array>
    5     2      > FE_RESET_R                                       $4      !0, ->8
          3    > > FE_FETCH_R                                               $4, !2, ->8
          4    >   MUL                                              ~6      !2, !2
          5        ASSIGN_DIM                                               !1
          6        OP_DATA                                                  ~6
          7      > JMP                                                      ->3
          8    >   FE_FREE                                                  $4
    6     9      > RETURN                                                   !1
    7    10*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.75 ms | 1398 KiB | 16 Q