3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ( $i = 0; $i < 10; $i++ ) { $array = range(0,5000); $start = microtime(true); var_dump(empty($array)); var_dump((microtime(true) - $start) * 1000000); unset($array, $start); $array = range(0,5000); $start = microtime(true); var_dump(count($array) === 0); var_dump((microtime(true) - $start) * 1000000); unset($array, $start); $array = range(0,5000); $start = microtime(true); var_dump($array == []); var_dump((microtime(true) - $start) * 1000000); unset($array, $start); echo "\n\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 74
Branch analysis from position: 74
2 jumps found. (Code = 44) Position 1 = 76, Position 2 = 2
Branch analysis from position: 76
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 76, Position 2 = 2
Branch analysis from position: 76
Branch analysis from position: 2
filename:       /in/GpIT6
function name:  (null)
number of ops:  77
compiled vars:  !0 = $i, !1 = $array, !2 = $start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->74
    6     2    >   INIT_FCALL                                               'range'
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 5000
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    7     7        INIT_FCALL                                               'microtime'
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !2, $6
    8    11        INIT_FCALL                                               'var_dump'
         12        ISSET_ISEMPTY_CV                                 ~8      !1
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                                 
    9    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'microtime'
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $10     
         19        SUB                                              ~11     $10, !2
         20        MUL                                              ~12     ~11, 1000000
         21        SEND_VAL                                                 ~12
         22        DO_ICALL                                                 
   10    23        UNSET_CV                                                 !1
         24        UNSET_CV                                                 !2
   12    25        INIT_FCALL                                               'range'
         26        SEND_VAL                                                 0
         27        SEND_VAL                                                 5000
         28        DO_ICALL                                         $14     
         29        ASSIGN                                                   !1, $14
   13    30        INIT_FCALL                                               'microtime'
         31        SEND_VAL                                                 <true>
         32        DO_ICALL                                         $16     
         33        ASSIGN                                                   !2, $16
   14    34        INIT_FCALL                                               'var_dump'
         35        COUNT                                            ~18     !1
         36        IS_IDENTICAL                                     ~19     ~18, 0
         37        SEND_VAL                                                 ~19
         38        DO_ICALL                                                 
   15    39        INIT_FCALL                                               'var_dump'
         40        INIT_FCALL                                               'microtime'
         41        SEND_VAL                                                 <true>
         42        DO_ICALL                                         $21     
         43        SUB                                              ~22     $21, !2
         44        MUL                                              ~23     ~22, 1000000
         45        SEND_VAL                                                 ~23
         46        DO_ICALL                                                 
   16    47        UNSET_CV                                                 !1
         48        UNSET_CV                                                 !2
   18    49        INIT_FCALL                                               'range'
         50        SEND_VAL                                                 0
         51        SEND_VAL                                                 5000
         52        DO_ICALL                                         $25     
         53        ASSIGN                                                   !1, $25
   19    54        INIT_FCALL                                               'microtime'
         55        SEND_VAL                                                 <true>
         56        DO_ICALL                                         $27     
         57        ASSIGN                                                   !2, $27
   20    58        INIT_FCALL                                               'var_dump'
         59        IS_EQUAL                                         ~29     !1, <array>
         60        SEND_VAL                                                 ~29
         61        DO_ICALL                                                 
   21    62        INIT_FCALL                                               'var_dump'
         63        INIT_FCALL                                               'microtime'
         64        SEND_VAL                                                 <true>
         65        DO_ICALL                                         $31     
         66        SUB                                              ~32     $31, !2
         67        MUL                                              ~33     ~32, 1000000
         68        SEND_VAL                                                 ~33
         69        DO_ICALL                                                 
   22    70        UNSET_CV                                                 !1
         71        UNSET_CV                                                 !2
   24    72        ECHO                                                     '%0A%0A'
    3    73        PRE_INC                                                  !0
         74    >   IS_SMALLER                                               !0, 10
         75      > JMPNZ                                                    ~36, ->2
   26    76    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.07 ms | 1009 KiB | 16 Q