3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $q = '#socialmedia within:15mi'; $result = preg_replace("/ within:\d+\w{2}/", "$1", $q, -1, $count); print_r($result); ?>
based on 1YcCr
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/2eWXF
function name:  (null)
number of ops:  13
compiled vars:  !0 = $q, !1 = $result, !2 = $count
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, '%23socialmedia+within%3A15mi'
   4     1        INIT_FCALL                                               'preg_replace'
         2        SEND_VAL                                                 '%2F+within%3A%5Cd%2B%5Cw%7B2%7D%2F'
         3        SEND_VAL                                                 '%241'
         4        SEND_VAR                                                 !0
         5        SEND_VAL                                                 -1
         6        SEND_REF                                                 !2
         7        DO_ICALL                                         $4      
         8        ASSIGN                                                   !1, $4
   5     9        INIT_FCALL                                               'print_r'
        10        SEND_VAR                                                 !1
        11        DO_ICALL                                                 
        12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0