3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = microtime(true); for($i = 1; $i <= 10000; $i++) { if(function_exists('mcrypt_encrypt')) { echo "y"; } else { echo "n"; } } $end = microtime(true); echo PHP_EOL."function_exists: ".($end - $start)."ms".PHP_EOL; $start = microtime(true); for($i = 1; $i <= 10000; $i++) { if(extension_loaded('mcrypt')) { echo "y"; } else { echo "n"; } } $end = microtime(true); echo PHP_EOL."extension_loaded: ".($end - $start)."ms";
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 = 6
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 39
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 31
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 37
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 31
Branch analysis from position: 41
Branch analysis from position: 31
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 41, Position 2 = 31
Branch analysis from position: 41
Branch analysis from position: 31
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
Branch analysis from position: 6
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 6
Branch analysis from position: 16
Branch analysis from position: 6
filename:       /in/q04t2
function name:  (null)
number of ops:  50
compiled vars:  !0 = $start, !1 = $i, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    4     4        ASSIGN                                                   !1, 1
          5      > JMP                                                      ->14
    5     6    >   INIT_FCALL                                               'function_exists'
          7        SEND_VAL                                                 'mcrypt_encrypt'
          8        DO_ICALL                                         $6      
          9      > JMPZ                                                     $6, ->12
    6    10    >   ECHO                                                     'y'
         11      > JMP                                                      ->13
    8    12    >   ECHO                                                     'n'
    4    13    >   PRE_INC                                                  !1
         14    >   IS_SMALLER_OR_EQUAL                                      !1, 10000
         15      > JMPNZ                                                    ~8, ->6
   11    16    >   INIT_FCALL                                               'microtime'
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $9      
         19        ASSIGN                                                   !2, $9
   12    20        SUB                                              ~11     !2, !0
         21        CONCAT                                           ~12     '%0Afunction_exists%3A+', ~11
         22        CONCAT                                           ~13     ~12, 'ms'
         23        CONCAT                                           ~14     ~13, '%0A'
         24        ECHO                                                     ~14
   14    25        INIT_FCALL                                               'microtime'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $15     
         28        ASSIGN                                                   !0, $15
   15    29        ASSIGN                                                   !1, 1
         30      > JMP                                                      ->39
   16    31    >   INIT_FCALL                                               'extension_loaded'
         32        SEND_VAL                                                 'mcrypt'
         33        DO_ICALL                                         $18     
         34      > JMPZ                                                     $18, ->37
   17    35    >   ECHO                                                     'y'
         36      > JMP                                                      ->38
   19    37    >   ECHO                                                     'n'
   15    38    >   PRE_INC                                                  !1
         39    >   IS_SMALLER_OR_EQUAL                                      !1, 10000
         40      > JMPNZ                                                    ~20, ->31
   22    41    >   INIT_FCALL                                               'microtime'
         42        SEND_VAL                                                 <true>
         43        DO_ICALL                                         $21     
         44        ASSIGN                                                   !2, $21
   23    45        SUB                                              ~23     !2, !0
         46        CONCAT                                           ~24     '%0Aextension_loaded%3A+', ~23
         47        CONCAT                                           ~25     ~24, 'ms'
         48        ECHO                                                     ~25
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.09 ms | 1400 KiB | 19 Q