3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.15 ms | 1400 KiB | 19 Q