3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'text^name1^PETER~text^secondname1^SMITH~text^phone1^023482348~text^adres1^STREETAVENUE 1B~text^postcode1^91201CA~text^woonplaats1^LIVINGPLACE~email^email1^peter@example.com'; preg_match_all('/(?:text|email)\^([^^]+)\^([^^~]*)/', $string, $matches, PREG_SET_ORDER); var_export( array_column($matches, 2, 1) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gEie6
function name:  (null)
number of ops:  16
compiled vars:  !0 = $string, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'text%5Ename1%5EPETER%7Etext%5Esecondname1%5ESMITH%7Etext%5Ephone1%5E023482348%7Etext%5Eadres1%5ESTREETAVENUE+1B%7Etext%5Epostcode1%5E91201CA%7Etext%5Ewoonplaats1%5ELIVINGPLACE%7Eemail%5Eemail1%5Epeter%40example.com'
    5     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%28%3F%3Atext%7Cemail%29%5C%5E%28%5B%5E%5E%5D%2B%29%5C%5E%28%5B%5E%5E%7E%5D%2A%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        SEND_VAL                                                 2
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'var_export'
    7     8        INIT_FCALL                                               'array_column'
          9        SEND_VAR                                                 !1
         10        SEND_VAL                                                 2
         11        SEND_VAL                                                 1
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
    6    14        DO_ICALL                                                 
    8    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.24 ms | 1001 KiB | 16 Q