3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attrPattern = '/([a-z0-9-]*)(=(["\']??)([^"\']*?)\\3)?/si'; $attr = 'target="_parent" data-foo data-bar="baz"'; preg_match_all($attrPattern, $attr, $matches, PREG_SET_ORDER); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qgWN4
function name:  (null)
number of ops:  12
compiled vars:  !0 = $attrPattern, !1 = $attr, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%28%5Ba-z0-9-%5D%2A%29%28%3D%28%5B%22%27%5D%3F%3F%29%28%5B%5E%22%27%5D%2A%3F%29%5C3%29%3F%2Fsi'
    5     1        ASSIGN                                                   !1, 'target%3D%22_parent%22+data-foo+data-bar%3D%22baz%22'
    7     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                                                 
    9     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.5 ms | 1394 KiB | 17 Q