3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "Name=John AND State=OR OR State=CA"; if (preg_match_all( '~([a-zA-Z]+=\S+)(?: ([A-Z]{2,3}))?~', $string, $out, PREG_SET_ORDER ) ) { echo "data = "; var_export(array_column($out, 1)); echo "\nconjunctions = "; var_export(array_column($out, 2)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 24
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/sveoe
function name:  (null)
number of ops:  25
compiled vars:  !0 = $string, !1 = $out
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, 'Name%3DJohn+AND+State%3DOR+OR+State%3DCA'
    6     1        INIT_FCALL                                                   'preg_match_all'
    7     2        SEND_VAL                                                     '%7E%28%5Ba-zA-Z%5D%2B%3D%5CS%2B%29%28%3F%3A+%28%5BA-Z%5D%7B2%2C3%7D%29%29%3F%7E'
    8     3        SEND_VAR                                                     !0
    9     4        SEND_REF                                                     !1
   10     5        SEND_VAL                                                     2
    6     6        DO_ICALL                                             $3      
   10     7      > JMPZ                                                         $3, ->24
   13     8    >   ECHO                                                         'data+%3D+'
   14     9        INIT_FCALL                                                   'var_export'
         10        INIT_FCALL                                                   'array_column'
         11        SEND_VAR                                                     !1
         12        SEND_VAL                                                     1
         13        DO_ICALL                                             $4      
         14        SEND_VAR                                                     $4
         15        DO_ICALL                                                     
   15    16        ECHO                                                         '%0Aconjunctions+%3D+'
   16    17        INIT_FCALL                                                   'var_export'
         18        INIT_FCALL                                                   'array_column'
         19        SEND_VAR                                                     !1
         20        SEND_VAL                                                     2
         21        DO_ICALL                                             $6      
         22        SEND_VAR                                                     $6
         23        DO_ICALL                                                     
   17    24    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
230.84 ms | 2269 KiB | 16 Q