3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '/server localhost:3306 root:some pass with spaces & a : colon'; preg_match('~/server ([^:]+):(\d+) (.+)~', $string, $m); array_shift($m); // remove the fullstring match var_export($m);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/j2HOv
function name:  (null)
number of ops:  13
compiled vars:  !0 = $string, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2Fserver+localhost%3A3306+root%3Asome+pass+with+spaces+%26+a+%3A+colon'
    5     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%7E%2Fserver+%28%5B%5E%3A%5D%2B%29%3A%28%5Cd%2B%29+%28.%2B%29%7E'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    6     6        INIT_FCALL                                               'array_shift'
          7        SEND_REF                                                 !1
          8        DO_ICALL                                                 
    7     9        INIT_FCALL                                               'var_export'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
267.26 ms | 1006 KiB | 16 Q