3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = '112312312312323'; $start_time = microtime(true); for ($i = 0; $i < 10000; $i++) { $foo = $foo.'1'; preg_match('/^[a-zA-Z0-9]+$/', $foo); // Result: 0.094325065612793 } $end_time = microtime(true); echo 'preg_match Result: ' . ($end_time - $start_time).PHP_EOL; $foo = '112312312312323'; $start_time = microtime(true); for ($i = 0; $i < 10000; $i++) { $foo = $foo.'1'; ctype_alnum($foo); // Result: 1.8465659618378 } $end_time = microtime(true); echo 'ctype Result: ' . ($end_time - $start_time).PHP_EOL;
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 = 7
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 31
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 31
Branch analysis from position: 39
Branch analysis from position: 31
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 7
Branch analysis from position: 16
Branch analysis from position: 7
filename:       /in/fjSaZ
function name:  (null)
number of ops:  48
compiled vars:  !0 = $foo, !1 = $start_time, !2 = $i, !3 = $end_time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '112312312312323'
    5     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    7     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->14
    8     7    >   CONCAT                                           ~8      !0, '1'
          8        ASSIGN                                                   !0, ~8
    9     9        INIT_FCALL                                               'preg_match'
         10        SEND_VAL                                                 '%2F%5E%5Ba-zA-Z0-9%5D%2B%24%2F'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
    7    13        PRE_INC                                                  !2
         14    >   IS_SMALLER                                               !2, 10000
         15      > JMPNZ                                                    ~12, ->7
   12    16    >   INIT_FCALL                                               'microtime'
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $13     
         19        ASSIGN                                                   !3, $13
   14    20        SUB                                              ~15     !3, !1
         21        CONCAT                                           ~16     'preg_match+Result%3A+', ~15
         22        CONCAT                                           ~17     ~16, '%0A'
         23        ECHO                                                     ~17
   16    24        ASSIGN                                                   !0, '112312312312323'
   18    25        INIT_FCALL                                               'microtime'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $19     
         28        ASSIGN                                                   !1, $19
   20    29        ASSIGN                                                   !2, 0
         30      > JMP                                                      ->37
   21    31    >   CONCAT                                           ~22     !0, '1'
         32        ASSIGN                                                   !0, ~22
   22    33        INIT_FCALL                                               'ctype_alnum'
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                                 
   20    36        PRE_INC                                                  !2
         37    >   IS_SMALLER                                               !2, 10000
         38      > JMPNZ                                                    ~26, ->31
   25    39    >   INIT_FCALL                                               'microtime'
         40        SEND_VAL                                                 <true>
         41        DO_ICALL                                         $27     
         42        ASSIGN                                                   !3, $27
   27    43        SUB                                              ~29     !3, !1
         44        CONCAT                                           ~30     'ctype+Result%3A+', ~29
         45        CONCAT                                           ~31     ~30, '%0A'
         46        ECHO                                                     ~31
   28    47      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.56 ms | 1017 KiB | 16 Q