3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "address='St Marks Church',notes='The North East\'s premier...'"; preg_match_all( "/(address|notes)='\K(?:\\\'|[^'])*/", $string, $out ); var_export(array_combine($out[1], $out[0])); echo "\n---\n"; preg_match_all( "/(address|notes)='((?:\\\'|[^'])*)/", $string, $out, PREG_SET_ORDER ); var_export(array_column($out, 2, 1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5ACSX
function name:  (null)
number of ops:  31
compiled vars:  !0 = $string, !1 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'address%3D%27St+Marks+Church%27%2Cnotes%3D%27The+North+East%5C%27s+premier...%27'
    5     1        INIT_FCALL                                               'preg_match_all'
    6     2        SEND_VAL                                                 '%2F%28address%7Cnotes%29%3D%27%5CK%28%3F%3A%5C%5C%27%7C%5B%5E%27%5D%29%2A%2F'
    7     3        SEND_VAR                                                 !0
    8     4        SEND_REF                                                 !1
    5     5        DO_ICALL                                                 
   10     6        INIT_FCALL                                               'var_export'
          7        INIT_FCALL                                               'array_combine'
          8        FETCH_DIM_R                                      ~4      !1, 1
          9        SEND_VAL                                                 ~4
         10        FETCH_DIM_R                                      ~5      !1, 0
         11        SEND_VAL                                                 ~5
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
   12    15        ECHO                                                     '%0A---%0A'
   14    16        INIT_FCALL                                               'preg_match_all'
   15    17        SEND_VAL                                                 '%2F%28address%7Cnotes%29%3D%27%28%28%3F%3A%5C%5C%27%7C%5B%5E%27%5D%29%2A%29%2F'
   16    18        SEND_VAR                                                 !0
   17    19        SEND_REF                                                 !1
   18    20        SEND_VAL                                                 2
   14    21        DO_ICALL                                                 
   20    22        INIT_FCALL                                               'var_export'
         23        INIT_FCALL                                               'array_column'
         24        SEND_VAR                                                 !1
         25        SEND_VAL                                                 2
         26        SEND_VAL                                                 1
         27        DO_ICALL                                         $9      
         28        SEND_VAR                                                 $9
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.1 ms | 1006 KiB | 17 Q