3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'a'=>'b', 'b'=>'c', 'c'=>'d', 'd'=>'e', 'e'=>'f', 'f'=>'g' ); $s = microtime(true); for ($i = 0; $i < 100000; $i++) { sizeOf($arr); } print microtime(true) - $s . PHP_EOL; $s = microtime(true); for ($i = 0; $i < 100000; $i++) { count($arr); } print microtime(true) - $s;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 7
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 24
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 24
Branch analysis from position: 29
Branch analysis from position: 24
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 7
Branch analysis from position: 12
Branch analysis from position: 7
filename:       /in/Dlmos
function name:  (null)
number of ops:  35
compiled vars:  !0 = $arr, !1 = $s, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   13     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->10
   14     7    >   COUNT                                            ~7      !0
          8        FREE                                                     ~7
   13     9        PRE_INC                                                  !2
         10    >   IS_SMALLER                                               !2, 100000
         11      > JMPNZ                                                    ~9, ->7
   16    12    >   INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $10     
         15        SUB                                              ~11     $10, !1
         16        CONCAT                                           ~12     ~11, '%0A'
         17        ECHO                                                     ~12
   18    18        INIT_FCALL                                               'microtime'
         19        SEND_VAL                                                 <true>
         20        DO_ICALL                                         $13     
         21        ASSIGN                                                   !1, $13
   19    22        ASSIGN                                                   !2, 0
         23      > JMP                                                      ->27
   20    24    >   COUNT                                            ~16     !0
         25        FREE                                                     ~16
   19    26        PRE_INC                                                  !2
         27    >   IS_SMALLER                                               !2, 100000
         28      > JMPNZ                                                    ~18, ->24
   22    29    >   INIT_FCALL                                               'microtime'
         30        SEND_VAL                                                 <true>
         31        DO_ICALL                                         $19     
         32        SUB                                              ~20     $19, !1
         33        ECHO                                                     ~20
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
133.49 ms | 1001 KiB | 14 Q