3v4l.org

run code in 500+ PHP versions simultaneously
<?php $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/J6L3u
function name:  (null)
number of ops:  17
compiled vars:  !0 = $string, !1 = $doesNotMatchInPhp7, !2 = $matchesInPhp7
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '--'
    5     1        ASSIGN                                                       !1, '%2F%28%3F%7C%28---%29%7C%28-%29%29%5C1%24%2F'
    6     2        ASSIGN                                                       !2, '%2F%28%3F%7C%28-%29%7C%28---%29%29%5C1%24%2F'
    8     3        INIT_FCALL                                                   'var_dump'
          4        FRAMELESS_ICALL_2                preg_match          ~6      !1, !0
          5        SEND_VAL                                                     ~6
          6        DO_ICALL                                                     
    9     7        INIT_FCALL                                                   'var_dump'
          8        INIT_FCALL                                                   'preg_last_error'
          9        DO_ICALL                                             $8      
         10        SEND_VAR                                                     $8
         11        DO_ICALL                                                     
   10    12        INIT_FCALL                                                   'var_dump'
         13        FRAMELESS_ICALL_2                preg_match          ~10     !2, !0
         14        SEND_VAL                                                     ~10
         15        DO_ICALL                                                     
         16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.43 ms | 2275 KiB | 15 Q