3v4l.org

run code in 300+ PHP versions simultaneously
<?php $range = range(1,100000); $start_time = microtime(); array_shift($range); $end_time = microtime(); echo "array_shift:" . $end_time - $start_time; echo "\n\n"; $start_time = microtime(); count($range); $end_time = microtime(); echo "count: " . $end_time - $start_time;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZrUHO
function name:  (null)
number of ops:  30
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                                                 100000
          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        CONCAT                                           ~11     'array_shift%3A', ~10
         16        ECHO                                                     ~11
   13    17        ECHO                                                     '%0A%0A'
   15    18        INIT_FCALL                                               'microtime'
         19        DO_ICALL                                         $12     
         20        ASSIGN                                                   !1, $12
   17    21        COUNT                                            ~14     !0
         22        FREE                                                     ~14
   19    23        INIT_FCALL                                               'microtime'
         24        DO_ICALL                                         $15     
         25        ASSIGN                                                   !2, $15
   21    26        SUB                                              ~17     !2, !1
         27        CONCAT                                           ~18     'count%3A+', ~17
         28        ECHO                                                     ~18
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.86 ms | 1387 KiB | 19 Q