3v4l.org

run code in 300+ PHP versions simultaneously
<?php $digits = '1234567890'; $alnum = '123test'; $start = microtime(true); for ($i = 0; $i < 1000; $i++) { preg_match('/^\d+$/D', $digits); preg_match('/^\d+$/D', $alnum); } //printf("%F\n", microtime(true) - $start); /* $start = microtime(true); for ($i = 0; $i < 1000; $i++) { strspn($digits, $digits) === strlen($digits); strspn($alnum, $digits) === strlen($alnum); } //printf("%F\n", microtime(true) - $start); */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 8
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 8
Branch analysis from position: 19
Branch analysis from position: 8
filename:       /in/EGqrl
function name:  (null)
number of ops:  20
compiled vars:  !0 = $digits, !1 = $alnum, !2 = $start, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1234567890'
    4     1        ASSIGN                                                   !1, '123test'
    6     2        INIT_FCALL                                               'microtime'
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !2, $6
    7     6        ASSIGN                                                   !3, 0
          7      > JMP                                                      ->17
    8     8    >   INIT_FCALL                                               'preg_match'
          9        SEND_VAL                                                 '%2F%5E%5Cd%2B%24%2FD'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
    9    12        INIT_FCALL                                               'preg_match'
         13        SEND_VAL                                                 '%2F%5E%5Cd%2B%24%2FD'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
    7    16        PRE_INC                                                  !3
         17    >   IS_SMALLER                                               !3, 1000
         18      > JMPNZ                                                    ~12, ->8
   19    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.34 ms | 1395 KiB | 17 Q