3v4l.org

run code in 500+ 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 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 10
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 43, Position 2 = 33
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 69
Branch analysis from position: 69
2 jumps found. (Code = 44) Position 1 = 71, Position 2 = 60
Branch analysis from position: 71
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 60
2 jumps found. (Code = 47) Position 1 = 62, Position 2 = 64
Branch analysis from position: 62
2 jumps found. (Code = 47) Position 1 = 65, Position 2 = 67
Branch analysis from position: 65
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 69
Branch analysis from position: 68
1 jumps found. (Code = 42) Position 1 = 69
Branch analysis from position: 69
Branch analysis from position: 69
Branch analysis from position: 67
Branch analysis from position: 64
Branch analysis from position: 33
2 jumps found. (Code = 46) Position 1 = 35, Position 2 = 37
Branch analysis from position: 35
2 jumps found. (Code = 46) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 41
Branch analysis from position: 41
Branch analysis from position: 41
Branch analysis from position: 40
Branch analysis from position: 37
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 14
Branch analysis from position: 14
Branch analysis from position: 14
filename:       /in/Cb6q4
function name:  (null)
number of ops:  82
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                                                          ->14
   20    10    >   FRAMELESS_ICALL_3                in_array            ~11     !1, !4
         11        OP_DATA                                                      <true>
         12        BOOL_NOT                                             ~12     ~11
         13      > JMPZ                                                         ~12, ->14
   18    14    >   PRE_DEC                                              ~13     !2
         15      > JMPNZ                                                        ~13, ->10
   27    16    >   INIT_FCALL                                                   'number_format'
         17        INIT_FCALL                                                   'microtime'
         18        SEND_VAL                                                     <true>
         19        DO_ICALL                                             $14     
         20        SUB                                                  ~15     $14, !3
         21        SEND_VAL                                                     ~15
         22        SEND_VAL                                                     5
         23        DO_ICALL                                             $16     
         24        CONCAT                                               ~17     $16, '%0A%0A'
         25        ECHO                                                         ~17
   29    26        ECHO                                                         'if+%26%26+'
   30    27        ASSIGN                                                       !2, !0
   31    28        INIT_FCALL                                                   'microtime'
         29        SEND_VAL                                                     <true>
         30        DO_ICALL                                             $19     
         31        ASSIGN                                                       !3, $19
   33    32      > JMP                                                          ->41
   35    33    >   IS_NOT_IDENTICAL                                     ~21     !1, 'update_plugins'
         34      > JMPZ_EX                                              ~21     ~21, ->37
         35    >   IS_NOT_IDENTICAL                                     ~22     !1, 'update_themes'
         36        BOOL                                                 ~21     ~22
         37    > > JMPZ_EX                                              ~21     ~21, ->40
         38    >   IS_NOT_IDENTICAL                                     ~23     !1, 'update_core'
         39        BOOL                                                 ~21     ~23
         40    > > JMPZ                                                         ~21, ->41
   33    41    >   PRE_DEC                                              ~24     !2
         42      > JMPNZ                                                        ~24, ->33
   42    43    >   INIT_FCALL                                                   'number_format'
         44        INIT_FCALL                                                   'microtime'
         45        SEND_VAL                                                     <true>
         46        DO_ICALL                                             $25     
         47        SUB                                                  ~26     $25, !3
         48        SEND_VAL                                                     ~26
         49        SEND_VAL                                                     5
         50        DO_ICALL                                             $27     
         51        CONCAT                                               ~28     $27, '%0A%0A'
         52        ECHO                                                         ~28
   44    53        ECHO                                                         'if+else+'
   45    54        ASSIGN                                                       !2, !0
   46    55        INIT_FCALL                                                   'microtime'
         56        SEND_VAL                                                     <true>
         57        DO_ICALL                                             $30     
         58        ASSIGN                                                       !3, $30
   48    59      > JMP                                                          ->69
   50    60    >   IS_NOT_IDENTICAL                                     ~32     !1, 'update_plugins'
         61      > JMPNZ_EX                                             ~32     ~32, ->64
         62    >   IS_NOT_IDENTICAL                                     ~33     !1, 'update_themes'
         63        BOOL                                                 ~32     ~33
         64    > > JMPNZ_EX                                             ~32     ~32, ->67
         65    >   IS_NOT_IDENTICAL                                     ~34     !1, 'update_core'
         66        BOOL                                                 ~32     ~34
         67    > > JMPZ                                                         ~32, ->69
         68    > > JMP                                                          ->69
   48    69    >   PRE_DEC                                              ~35     !2
         70      > JMPNZ                                                        ~35, ->60
   61    71    >   INIT_FCALL                                                   'number_format'
         72        INIT_FCALL                                                   'microtime'
         73        SEND_VAL                                                     <true>
         74        DO_ICALL                                             $36     
         75        SUB                                                  ~37     $36, !3
         76        SEND_VAL                                                     ~37
         77        SEND_VAL                                                     5
         78        DO_ICALL                                             $38     
         79        CONCAT                                               ~39     $38, '%0A%0A'
         80        ECHO                                                         ~39
   69    81      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.38 ms | 1107 KiB | 17 Q