3v4l.org

run code in 500+ PHP versions simultaneously
<?php $pattern = <<<'REGEX' ~ (?(DEFINE) (?<dqstring> " [^\\"]*+ (?s: \\ . [^\\"]* )*+ " ) (?<bcontent> [^()"]*+ (?: \g<dqstring> [^()"]* )*+ ) (?<rbrackets> \( \g<bcontent> (?: \g<rbrackets> \g<bcontent> )*+ \) ) (?<pcontent> [^,()"]* (?: (?: \g<dqstring> | \g<rbrackets> ) [^,()"]* )* ) ) \G [(,] \s* (?<param> \g<pcontent> ) (*:param) | (?<funcName> \w+ ) (*:funcName) ~xu REGEX; $str = 'not(matches(#[Sécurité][Alarme][Mode]#, ["Desarmer",{"action":"Desarmer Sys"}]), result)'; preg_match_all($pattern, $str, $matches, PREG_SET_ORDER); foreach($matches as $m) { $type = $m['MARK']; echo "$type: ", $m[$type], PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/Qe1hO
function name:  (null)
number of ops:  21
compiled vars:  !0 = $pattern, !1 = $str, !2 = $matches, !3 = $m, !4 = $type
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '%7E%0A%28%3F%28DEFINE%29%0A++++%28%3F%3Cdqstring%3E+%22+%5B%5E%5C%5C%22%5D%2A%2B+%28%3Fs%3A+%5C%5C+.+%5B%5E%5C%5C%22%5D%2A+%29%2A%2B+%22+%29%0A++++%28%3F%3Cbcontent%3E+%5B%5E%28%29%22%5D%2A%2B+%28%3F%3A+%5Cg%3Cdqstring%3E+%5B%5E%28%29%22%5D%2A+%29%2A%2B+%29%0A++++%28%3F%3Crbrackets%3E+%5C%28+%5Cg%3Cbcontent%3E+%28%3F%3A+%5Cg%3Crbrackets%3E+%5Cg%3Cbcontent%3E+%29%2A%2B+%5C%29+%29%0A++++%0A++++%28%3F%3Cpcontent%3E+%5B%5E%2C%28%29%22%5D%2A+%28%3F%3A+%28%3F%3A+%5Cg%3Cdqstring%3E+%7C+%5Cg%3Crbrackets%3E+%29+%5B%5E%2C%28%29%22%5D%2A+%29%2A+%29%0A%29%0A%0A++++%5CG+%5B%28%2C%5D+%5Cs%2A+%28%3F%3Cparam%3E+%5Cg%3Cpcontent%3E+%29+%28%2A%3Aparam%29%0A%7C%0A++++%28%3F%3CfuncName%3E+%5Cw%2B+%29+%28%2A%3AfuncName%29%0A%7Exu'
   19     1        ASSIGN                                                       !1, 'not%28matches%28%23%5BS%C3%A9curit%C3%A9%5D%5BAlarme%5D%5BMode%5D%23%2C+%5B%22Desarmer%22%2C%7B%22action%22%3A%22Desarmer+Sys%22%7D%5D%29%2C+result%29'
   21     2        INIT_FCALL                                                   'preg_match_all'
          3        SEND_VAR                                                     !0
          4        SEND_VAR                                                     !1
          5        SEND_REF                                                     !2
          6        SEND_VAL                                                     2
          7        DO_ICALL                                                     
   23     8      > FE_RESET_R                                           $8      !2, ->19
          9    > > FE_FETCH_R                                                   $8, !3, ->19
   24    10    >   FETCH_DIM_R                                          ~9      !3, 'MARK'
         11        ASSIGN                                                       !4, ~9
   25    12        NOP                                                          
         13        FAST_CONCAT                                          ~11     !4, '%3A++'
         14        ECHO                                                         ~11
         15        FETCH_DIM_R                                          ~12     !3, !4
         16        ECHO                                                         ~12
         17        ECHO                                                         '%0A'
   23    18      > JMP                                                          ->9
         19    >   FE_FREE                                                      $8
   26    20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.15 ms | 1902 KiB | 14 Q