3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'test //ita https://example.com lics// test // another // one'; $regex = '~(https?://)(*SKIP)(*F)|//\s*((?:(?1)|.)*?)\s*//~'; preg_match_all($regex, $text, $matches); print_r($matches[2]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4LcYY
function name:  (null)
number of ops:  12
compiled vars:  !0 = $text, !1 = $regex, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'test+%2F%2Fita+https%3A%2F%2Fexample.com+lics%2F%2F+test+%2F%2F+another+%2F%2F+one'
    4     1        ASSIGN                                                   !1, '%7E%28https%3F%3A%2F%2F%29%28%2ASKIP%29%28%2AF%29%7C%2F%2F%5Cs%2A%28%28%3F%3A%28%3F1%29%7C.%29%2A%3F%29%5Cs%2A%2F%2F%7E'
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'print_r'
          8        FETCH_DIM_R                                      ~6      !2, 2
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.38 ms | 1013 KiB | 15 Q