3v4l.org

run code in 300+ PHP versions simultaneously
<?php $range = range(1, 500000); $startTime = microtime(true); array_rand($range,2); echo "Time: " . number_format(( microtime(true) - $startTime), 4) . " Seconds\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dqXt8
function name:  (null)
number of ops:  25
compiled vars:  !0 = $range, !1 = $startTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 1
          2        SEND_VAL                                                 500000
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    3     5        INIT_FCALL                                               'microtime'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !1, $4
    4     9        INIT_FCALL                                               'array_rand'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 2
         12        DO_ICALL                                                 
    5    13        INIT_FCALL                                               'number_format'
         14        INIT_FCALL                                               'microtime'
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $7      
         17        SUB                                              ~8      $7, !1
         18        SEND_VAL                                                 ~8
         19        SEND_VAL                                                 4
         20        DO_ICALL                                         $9      
         21        CONCAT                                           ~10     'Time%3A++', $9
         22        CONCAT                                           ~11     ~10, '+Seconds%0A'
         23        ECHO                                                     ~11
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.86 ms | 1386 KiB | 21 Q