3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.6 ms | 1400 KiB | 19 Q