3v4l.org

run code in 500+ 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 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 29
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 29
Branch analysis from position: 37
Branch analysis from position: 29
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
Branch analysis from position: 7
filename:       /in/fjSaZ
function name:  (null)
number of ops:  46
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                                                          ->12
    8     7    >   CONCAT                                               ~8      !0, '1'
          8        ASSIGN                                                       !0, ~8
    9     9        FRAMELESS_ICALL_2                preg_match          ~10     '%2F%5E%5Ba-zA-Z0-9%5D%2B%24%2F', !0
         10        FREE                                                         ~10
    7    11        PRE_INC                                                      !2
         12    >   IS_SMALLER                                                   !2, 10000
         13      > JMPNZ                                                        ~12, ->7
   12    14    >   INIT_FCALL                                                   'microtime'
         15        SEND_VAL                                                     <true>
         16        DO_ICALL                                             $13     
         17        ASSIGN                                                       !3, $13
   14    18        SUB                                                  ~15     !3, !1
         19        CONCAT                                               ~16     'preg_match+Result%3A+', ~15
         20        CONCAT                                               ~17     ~16, '%0A'
         21        ECHO                                                         ~17
   16    22        ASSIGN                                                       !0, '112312312312323'
   18    23        INIT_FCALL                                                   'microtime'
         24        SEND_VAL                                                     <true>
         25        DO_ICALL                                             $19     
         26        ASSIGN                                                       !1, $19
   20    27        ASSIGN                                                       !2, 0
         28      > JMP                                                          ->35
   21    29    >   CONCAT                                               ~22     !0, '1'
         30        ASSIGN                                                       !0, ~22
   22    31        INIT_FCALL                                                   'ctype_alnum'
         32        SEND_VAR                                                     !0
         33        DO_ICALL                                                     
   20    34        PRE_INC                                                      !2
         35    >   IS_SMALLER                                                   !2, 10000
         36      > JMPNZ                                                        ~26, ->29
   25    37    >   INIT_FCALL                                                   'microtime'
         38        SEND_VAL                                                     <true>
         39        DO_ICALL                                             $27     
         40        ASSIGN                                                       !3, $27
   27    41        SUB                                                  ~29     !3, !1
         42        CONCAT                                               ~30     'ctype+Result%3A+', ~29
         43        CONCAT                                               ~31     ~30, '%0A'
         44        ECHO                                                         ~31
   28    45      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.8 ms | 2382 KiB | 15 Q