3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = range(0, 10000); $start_time = microtime(true); for ($index = 0; $index < 100000; $index++) { count($arr); } echo 'Took: ' . (string) (microtime(true) - $start_time) . "\n"; $start_time = microtime(true); for ($index = 0; $index < 100000; $index++) { empty($arr); } echo 'Took: ' . (string) (microtime(true) - $start_time) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 11
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 30
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 30
Branch analysis from position: 35
Branch analysis from position: 30
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 11
Branch analysis from position: 16
Branch analysis from position: 11
filename:       /in/W4Ir1
function name:  (null)
number of ops:  44
compiled vars:  !0 = $arr, !1 = $start_time, !2 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 10000
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    5     5        INIT_FCALL                                               'microtime'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
    6     9        ASSIGN                                                   !2, 0
         10      > JMP                                                      ->14
    8    11    >   COUNT                                            ~8      !0
         12        FREE                                                     ~8
    6    13        PRE_INC                                                  !2
         14    >   IS_SMALLER                                               !2, 100000
         15      > JMPNZ                                                    ~10, ->11
   10    16    >   INIT_FCALL                                               'microtime'
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $11     
         19        SUB                                              ~12     $11, !1
         20        CAST                                          6  ~13     ~12
         21        CONCAT                                           ~14     'Took%3A+', ~13
         22        CONCAT                                           ~15     ~14, '%0A'
         23        ECHO                                                     ~15
   12    24        INIT_FCALL                                               'microtime'
         25        SEND_VAL                                                 <true>
         26        DO_ICALL                                         $16     
         27        ASSIGN                                                   !1, $16
   13    28        ASSIGN                                                   !2, 0
         29      > JMP                                                      ->33
   15    30    >   ISSET_ISEMPTY_CV                                 ~19     !0
         31        FREE                                                     ~19
   13    32        PRE_INC                                                  !2
         33    >   IS_SMALLER                                               !2, 100000
         34      > JMPNZ                                                    ~21, ->30
   17    35    >   INIT_FCALL                                               'microtime'
         36        SEND_VAL                                                 <true>
         37        DO_ICALL                                         $22     
         38        SUB                                              ~23     $22, !1
         39        CAST                                          6  ~24     ~23
         40        CONCAT                                           ~25     'Took%3A+', ~24
         41        CONCAT                                           ~26     ~25, '%0A'
         42        ECHO                                                     ~26
         43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.77 ms | 1400 KiB | 17 Q