3v4l.org

run code in 300+ PHP versions simultaneously
<?php $line = '1:wlrb@yahoo.com:7:8.35'; var_export( array_combine( ['id', 'email_address', 'domain', 'number_of_orders', 'total_order_value'], explode(':', preg_replace('#@([^:]*)\K#', ':$1', $line)) ) ); echo "\n---\n"; // demo of replacement: echo preg_replace('#@([^:]*)\K#', ':$1', $line);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CX9rm
function name:  (null)
number of ops:  25
compiled vars:  !0 = $line
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1%3Awlrb%40yahoo.com%3A7%3A8.35'
    4     1        INIT_FCALL                                               'var_export'
    5     2        INIT_FCALL                                               'array_combine'
    6     3        SEND_VAL                                                 <array>
    7     4        INIT_FCALL                                               'explode'
          5        SEND_VAL                                                 '%3A'
          6        INIT_FCALL                                               'preg_replace'
          7        SEND_VAL                                                 '%23%40%28%5B%5E%3A%5D%2A%29%5CK%23'
          8        SEND_VAL                                                 '%3A%241'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $2      
         11        SEND_VAR                                                 $2
         12        DO_ICALL                                         $3      
         13        SEND_VAR                                                 $3
    5    14        DO_ICALL                                         $4      
    7    15        SEND_VAR                                                 $4
    4    16        DO_ICALL                                                 
   11    17        ECHO                                                     '%0A---%0A'
   14    18        INIT_FCALL                                               'preg_replace'
         19        SEND_VAL                                                 '%23%40%28%5B%5E%3A%5D%2A%29%5CK%23'
         20        SEND_VAL                                                 '%3A%241'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $6      
         23        ECHO                                                     $6
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.81 ms | 1013 KiB | 17 Q