3v4l.org

run code in 300+ PHP versions simultaneously
<?php $range = range(1,1000000); $start_time = microtime(); array_shift($range); $end_time = microtime(); echo $end_time - $start_time; $start_time = microtime(); count($range); $end_time = microtime(); echo $end_time - $start_time;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ovu7j
function name:  (null)
number of ops:  27
compiled vars:  !0 = $range, !1 = $start_time, !2 = $end_time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 1000000
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    5     5        INIT_FCALL                                               'microtime'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    7     8        INIT_FCALL                                               'array_shift'
          9        SEND_REF                                                 !0
         10        DO_ICALL                                                 
    9    11        INIT_FCALL                                               'microtime'
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !2, $8
   11    14        SUB                                              ~10     !2, !1
         15        ECHO                                                     ~10
   15    16        INIT_FCALL                                               'microtime'
         17        DO_ICALL                                         $11     
         18        ASSIGN                                                   !1, $11
   17    19        COUNT                                            ~13     !0
         20        FREE                                                     ~13
   19    21        INIT_FCALL                                               'microtime'
         22        DO_ICALL                                         $14     
         23        ASSIGN                                                   !2, $14
   21    24        SUB                                              ~16     !2, !1
         25        ECHO                                                     ~16
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.6 ms | 1387 KiB | 19 Q