3v4l.org

run code in 500+ PHP versions simultaneously
<?php $keyword = array_fill(1, 232, 'system'); $start = microtime(true); for ($i = 0; $i < 50000; $i++) { in_array('user', $keyword, true); } $end = microtime(true); echo 'In Array: ' . ($end - $start); echo "\r\n"; $start = microtime(true); for ($i = 0; $i < 50000; $i++) { isset($keyword['user']); } $end = microtime(true); echo 'Isset: ' . ($end - $start);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 12
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 32
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 32
Branch analysis from position: 37
Branch analysis from position: 32
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 12
Branch analysis from position: 18
Branch analysis from position: 12
filename:       /in/2R4Dg
function name:  (null)
number of ops:  45
compiled vars:  !0 = $keyword, !1 = $start, !2 = $i, !3 = $end
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'array_fill'
          1        SEND_VAL                                                     1
          2        SEND_VAL                                                     232
          3        SEND_VAL                                                     'system'
          4        DO_ICALL                                             $4      
          5        ASSIGN                                                       !0, $4
    5     6        INIT_FCALL                                                   'microtime'
          7        SEND_VAL                                                     <true>
          8        DO_ICALL                                             $6      
          9        ASSIGN                                                       !1, $6
    6    10        ASSIGN                                                       !2, 0
         11      > JMP                                                          ->16
    7    12    >   FRAMELESS_ICALL_3                in_array            ~9      'user', !0
         13        OP_DATA                                                      <true>
         14        FREE                                                         ~9
    6    15        PRE_INC                                                      !2
         16    >   IS_SMALLER                                                   !2, 50000
         17      > JMPNZ                                                        ~11, ->12
    9    18    >   INIT_FCALL                                                   'microtime'
         19        SEND_VAL                                                     <true>
         20        DO_ICALL                                             $12     
         21        ASSIGN                                                       !3, $12
   10    22        SUB                                                  ~14     !3, !1
         23        CONCAT                                               ~15     'In+Array%3A+', ~14
         24        ECHO                                                         ~15
   12    25        ECHO                                                         '%0D%0A'
   14    26        INIT_FCALL                                                   'microtime'
         27        SEND_VAL                                                     <true>
         28        DO_ICALL                                             $16     
         29        ASSIGN                                                       !1, $16
   15    30        ASSIGN                                                       !2, 0
         31      > JMP                                                          ->35
   16    32    >   ISSET_ISEMPTY_DIM_OBJ                             0  ~19     !0, 'user'
         33        FREE                                                         ~19
   15    34        PRE_INC                                                      !2
         35    >   IS_SMALLER                                                   !2, 50000
         36      > JMPNZ                                                        ~21, ->32
   18    37    >   INIT_FCALL                                                   'microtime'
         38        SEND_VAL                                                     <true>
         39        DO_ICALL                                             $22     
         40        ASSIGN                                                       !3, $22
   19    41        SUB                                                  ~24     !3, !1
         42        CONCAT                                               ~25     'Isset%3A+', ~24
         43        ECHO                                                         ~25
         44      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
179.74 ms | 1418 KiB | 15 Q