3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'foo' => 'bar', ); $timestamp = microtime(true); for ($i=1;$i<10000;$i++) { if (array_keys($array)) {} } $timestamp = microtime(true)-$timestamp; var_dump($timestamp); for ($i=1;$i<10000;$i++) { if (!empty($array)) {} } $timestamp = microtime(true)-$timestamp; var_dump($timestamp);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 24
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 24
Branch analysis from position: 30
Branch analysis from position: 24
Branch analysis from position: 27
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
Branch analysis from position: 7
Branch analysis from position: 11
filename:       /in/ckiHf
function name:  (null)
number of ops:  39
compiled vars:  !0 = $array, !1 = $timestamp, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    8     5        ASSIGN                                                   !2, 1
          6      > JMP                                                      ->12
    9     7    >   INIT_FCALL                                               'array_keys'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $7      
         10      > JMPZ                                                     $7, ->11
    8    11    >   PRE_INC                                                  !2
         12    >   IS_SMALLER                                               !2, 10000
         13      > JMPNZ                                                    ~9, ->7
   12    14    >   INIT_FCALL                                               'microtime'
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $10     
         17        SUB                                              ~11     $10, !1
         18        ASSIGN                                                   !1, ~11
   13    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
   16    22        ASSIGN                                                   !2, 1
         23      > JMP                                                      ->28
   17    24    >   ISSET_ISEMPTY_CV                                 ~15     !0
         25        BOOL_NOT                                         ~16     ~15
         26      > JMPZ                                                     ~16, ->27
   16    27    >   PRE_INC                                                  !2
         28    >   IS_SMALLER                                               !2, 10000
         29      > JMPNZ                                                    ~18, ->24
   20    30    >   INIT_FCALL                                               'microtime'
         31        SEND_VAL                                                 <true>
         32        DO_ICALL                                         $19     
         33        SUB                                              ~20     $19, !1
         34        ASSIGN                                                   !1, ~20
   21    35        INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !1
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.08 ms | 1400 KiB | 19 Q