3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 'news', 'news?test=1', 'news/list?test=1', ); $res = array(); preg_match('/(\w)+[\?\/]?/', $arr, $res); print_r($res);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/icPr7
function name:  (null)
number of ops:  11
compiled vars:  !0 = $arr, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   10     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAL                                                 '%2F%28%5Cw%29%2B%5B%5C%3F%5C%2F%5D%3F%2F'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                                 
   11     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.38 ms | 1394 KiB | 17 Q