3v4l.org

run code in 500+ PHP versions simultaneously
<?php ini_set("pcre.jit", 0); $string = '--'; $doesNotMatchInPhp7 = '/(?|(---)|(-))\1$/'; $matchesInPhp7 = '/(?|(-)|(---))\1$/'; var_dump(preg_match($doesNotMatchInPhp7, $string)); var_dump(preg_last_error()); var_dump(preg_match($matchesInPhp7, $string));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7dAic
function name:  (null)
number of ops:  21
compiled vars:  !0 = $string, !1 = $doesNotMatchInPhp7, !2 = $matchesInPhp7
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'ini_set'
          1        SEND_VAL                                                     'pcre.jit'
          2        SEND_VAL                                                     0
          3        DO_ICALL                                                     
    5     4        ASSIGN                                                       !0, '--'
    7     5        ASSIGN                                                       !1, '%2F%28%3F%7C%28---%29%7C%28-%29%29%5C1%24%2F'
    8     6        ASSIGN                                                       !2, '%2F%28%3F%7C%28-%29%7C%28---%29%29%5C1%24%2F'
   10     7        INIT_FCALL                                                   'var_dump'
          8        FRAMELESS_ICALL_2                preg_match          ~7      !1, !0
          9        SEND_VAL                                                     ~7
         10        DO_ICALL                                                     
   11    11        INIT_FCALL                                                   'var_dump'
         12        INIT_FCALL                                                   'preg_last_error'
         13        DO_ICALL                                             $9      
         14        SEND_VAR                                                     $9
         15        DO_ICALL                                                     
   12    16        INIT_FCALL                                                   'var_dump'
         17        FRAMELESS_ICALL_2                preg_match          ~11     !2, !0
         18        SEND_VAL                                                     ~11
         19        DO_ICALL                                                     
         20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.35 ms | 2522 KiB | 16 Q