3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); $arr = range(1, 10000); foreach (array_reverse($arr) as $v) { array_pop($arr); } echo round(microtime(true) - $start, 5);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/C4s75
function name:  (null)
number of ops:  29
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        INIT_FCALL                                               'array_reverse'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $7      
         12      > FE_RESET_R                                       $8      $7, ->18
         13    > > FE_FETCH_R                                               $8, !2, ->18
   10    14    >   INIT_FCALL                                               'array_pop'
         15        SEND_REF                                                 !1
         16        DO_ICALL                                                 
    9    17      > JMP                                                      ->13
         18    >   FE_FREE                                                  $8
   14    19        INIT_FCALL                                               'round'
         20        INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $10     
         23        SUB                                              ~11     $10, !0
         24        SEND_VAL                                                 ~11
         25        SEND_VAL                                                 5
         26        DO_ICALL                                         $12     
         27        ECHO                                                     $12
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.68 ms | 1396 KiB | 23 Q