3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '12-34-56-78'; $pattern = '/^\d{2}(?|(---)|(-)|(\.)|(\:))\d{2}\1\d{2}\1\d{2}$/'; $result = preg_match($pattern, $string); var_dump($result); var_dump(PCRE_VERSION);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ndQQ8
function name:  (null)
number of ops:  14
compiled vars:  !0 = $string, !1 = $pattern, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '12-34-56-78'
    4     1        ASSIGN                                                   !1, '%2F%5E%5Cd%7B2%7D%28%3F%7C%28---%29%7C%28-%29%7C%28%5C.%29%7C%28%5C%3A%29%29%5Cd%7B2%7D%5C1%5Cd%7B2%7D%5C1%5Cd%7B2%7D%24%2F'
    5     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    6     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
    7    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAL                                                 '10.42+2022-12-12'
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.38 ms | 1010 KiB | 15 Q