3v4l.org

run code in 300+ 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:  27
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        INIT_FCALL                                               'preg_match'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                                 
   11    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'preg_last_error'
         16        DO_ICALL                                         $9      
         17        SEND_VAR                                                 $9
         18        DO_ICALL                                                 
   12    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'preg_match'
         21        SEND_VAR                                                 !2
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $11     
         24        SEND_VAR                                                 $11
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.1 ms | 1395 KiB | 21 Q