3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); $arr = range(1, 10000); foreach ($arr as $v) { array_shift($arr); } echo round(microtime(true) - $start, 5);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/LZqqo
function name:  (null)
number of ops:  26
compiled vars:  !0 = $start, !1 = $arr, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    7     4        INIT_FCALL                                               'range'
          5        SEND_VAL                                                 1
          6        SEND_VAL                                                 10000
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
    9     9      > FE_RESET_R                                       $7      !1, ->15
         10    > > FE_FETCH_R                                               $7, !2, ->15
   10    11    >   INIT_FCALL                                               'array_shift'
         12        SEND_REF                                                 !1
         13        DO_ICALL                                                 
    9    14      > JMP                                                      ->10
         15    >   FE_FREE                                                  $7
   14    16        INIT_FCALL                                               'round'
         17        INIT_FCALL                                               'microtime'
         18        SEND_VAL                                                 <true>
         19        DO_ICALL                                         $9      
         20        SUB                                              ~10     $9, !0
         21        SEND_VAL                                                 ~10
         22        SEND_VAL                                                 5
         23        DO_ICALL                                         $11     
         24        ECHO                                                     $11
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.11 ms | 1395 KiB | 21 Q