3v4l.org

run code in 300+ PHP versions simultaneously
<?php #$INTERVAL = 1_000_000_000; #$INTERVAL = 100_000_000; #$INTERVAL = 1_000000; $INTERVAL = 100000; $search = "timeouted"; #$search = "update_core"; echo "in_array "; $stop = $INTERVAL; $start = microtime(true); $array = array( 'update_core', 'update_plugins', 'update_themes' ); while(--$stop) { if( ! in_array( $search, $array, true ) ){ /* * Put Code Here */ } } echo number_format(microtime(true) - $start, 5)."\n\n"; echo "if && "; $stop = $INTERVAL; $start = microtime(true); while(--$stop) { if ( $search !== 'update_plugins' && $search !== 'update_themes' && $search !== 'update_core' ) { /* * Put Code Here */ } } echo number_format(microtime(true) - $start, 5)."\n\n"; echo "if else "; $stop = $INTERVAL; $start = microtime(true); while(--$stop) { if ( $search !== 'update_plugins' || $search !== 'update_themes' || $search !== 'update_core' ) { /* * Nothing Here */ }else{ /* * Put Code Here */ } } echo number_format(microtime(true) - $start, 5)."\n\n"; //OUTPUT //in_array 2.32199 //if && 2.66951 //if else 1.28673
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 10
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
2 jumps found. (Code = 44) Position 1 = 46, Position 2 = 36
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 72
Branch analysis from position: 72
2 jumps found. (Code = 44) Position 1 = 74, Position 2 = 63
Branch analysis from position: 74
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 63
2 jumps found. (Code = 47) Position 1 = 65, Position 2 = 67
Branch analysis from position: 65
2 jumps found. (Code = 47) Position 1 = 68, Position 2 = 70
Branch analysis from position: 68
2 jumps found. (Code = 43) Position 1 = 71, Position 2 = 72
Branch analysis from position: 71
1 jumps found. (Code = 42) Position 1 = 72
Branch analysis from position: 72
Branch analysis from position: 72
Branch analysis from position: 70
Branch analysis from position: 67
Branch analysis from position: 36
2 jumps found. (Code = 46) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
2 jumps found. (Code = 46) Position 1 = 41, Position 2 = 43
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 44
Branch analysis from position: 44
Branch analysis from position: 44
Branch analysis from position: 43
Branch analysis from position: 40
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 17
Branch analysis from position: 17
Branch analysis from position: 17
filename:       /in/Cb6q4
function name:  (null)
number of ops:  85
compiled vars:  !0 = $INTERVAL, !1 = $search, !2 = $stop, !3 = $start, !4 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 100000
    8     1        ASSIGN                                                   !1, 'timeouted'
   12     2        ECHO                                                     'in_array+'
   13     3        ASSIGN                                                   !2, !0
   14     4        INIT_FCALL                                               'microtime'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !3, $8
   17     8        ASSIGN                                                   !4, <array>
   18     9      > JMP                                                      ->17
   20    10    >   INIT_FCALL                                               'in_array'
         11        SEND_VAR                                                 !1
         12        SEND_VAR                                                 !4
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $11     
         15        BOOL_NOT                                         ~12     $11
         16      > JMPZ                                                     ~12, ->17
   18    17    >   PRE_DEC                                          ~13     !2
         18      > JMPNZ                                                    ~13, ->10
   27    19    >   INIT_FCALL                                               'number_format'
         20        INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $14     
         23        SUB                                              ~15     $14, !3
         24        SEND_VAL                                                 ~15
         25        SEND_VAL                                                 5
         26        DO_ICALL                                         $16     
         27        CONCAT                                           ~17     $16, '%0A%0A'
         28        ECHO                                                     ~17
   29    29        ECHO                                                     'if+%26%26+'
   30    30        ASSIGN                                                   !2, !0
   31    31        INIT_FCALL                                               'microtime'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $19     
         34        ASSIGN                                                   !3, $19
   33    35      > JMP                                                      ->44
   35    36    >   IS_NOT_IDENTICAL                                 ~21     !1, 'update_plugins'
         37      > JMPZ_EX                                          ~21     ~21, ->40
         38    >   IS_NOT_IDENTICAL                                 ~22     !1, 'update_themes'
         39        BOOL                                             ~21     ~22
         40    > > JMPZ_EX                                          ~21     ~21, ->43
         41    >   IS_NOT_IDENTICAL                                 ~23     !1, 'update_core'
         42        BOOL                                             ~21     ~23
         43    > > JMPZ                                                     ~21, ->44
   33    44    >   PRE_DEC                                          ~24     !2
         45      > JMPNZ                                                    ~24, ->36
   42    46    >   INIT_FCALL                                               'number_format'
         47        INIT_FCALL                                               'microtime'
         48        SEND_VAL                                                 <true>
         49        DO_ICALL                                         $25     
         50        SUB                                              ~26     $25, !3
         51        SEND_VAL                                                 ~26
         52        SEND_VAL                                                 5
         53        DO_ICALL                                         $27     
         54        CONCAT                                           ~28     $27, '%0A%0A'
         55        ECHO                                                     ~28
   44    56        ECHO                                                     'if+else+'
   45    57        ASSIGN                                                   !2, !0
   46    58        INIT_FCALL                                               'microtime'
         59        SEND_VAL                                                 <true>
         60        DO_ICALL                                         $30     
         61        ASSIGN                                                   !3, $30
   48    62      > JMP                                                      ->72
   50    63    >   IS_NOT_IDENTICAL                                 ~32     !1, 'update_plugins'
         64      > JMPNZ_EX                                         ~32     ~32, ->67
         65    >   IS_NOT_IDENTICAL                                 ~33     !1, 'update_themes'
         66        BOOL                                             ~32     ~33
         67    > > JMPNZ_EX                                         ~32     ~32, ->70
         68    >   IS_NOT_IDENTICAL                                 ~34     !1, 'update_core'
         69        BOOL                                             ~32     ~34
         70    > > JMPZ                                                     ~32, ->72
         71    > > JMP                                                      ->72
   48    72    >   PRE_DEC                                          ~35     !2
         73      > JMPNZ                                                    ~35, ->63
   61    74    >   INIT_FCALL                                               'number_format'
         75        INIT_FCALL                                               'microtime'
         76        SEND_VAL                                                 <true>
         77        DO_ICALL                                         $36     
         78        SUB                                              ~37     $36, !3
         79        SEND_VAL                                                 ~37
         80        SEND_VAL                                                 5
         81        DO_ICALL                                         $38     
         82        CONCAT                                           ~39     $38, '%0A%0A'
         83        ECHO                                                     ~39
   69    84      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.02 ms | 1437 KiB | 16 Q