3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = "The text you want to filter goes here. http://google.com, https://www.youtube.com/watch?v=K_m7NEDMrV0,https://instagram.com/hellow/"; $ns = preg_replace_callback( '#\bhttps?://[^,\s()<>]+(?:\([\w\d]+\)|([^,[:punct:]\s]|/))#', function($match) { // print_r($match); return md5($match[0]); }, $string ); print_r($ns);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWmCp
function name:  (null)
number of ops:  12
compiled vars:  !0 = $string, !1 = $ns
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'The+text+you+want+to+filter+goes+here.+http%3A%2F%2Fgoogle.com%2C+https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DK_m7NEDMrV0%2Chttps%3A%2F%2Finstagram.com%2Fhellow%2F'
    5     1        INIT_FCALL                                                   'preg_replace_callback'
    6     2        SEND_VAL                                                     '%23%5Cbhttps%3F%3A%2F%2F%5B%5E%2C%5Cs%28%29%3C%3E%5D%2B%28%3F%3A%5C%28%5B%5Cw%5Cd%5D%2B%5C%29%7C%28%5B%5E%2C%5B%3Apunct%3A%5D%5Cs%5D%7C%2F%29%29%23'
    7     3        DECLARE_LAMBDA_FUNCTION                              ~3      [0]
   10     4        SEND_VAL                                                     ~3
   11     5        SEND_VAR                                                     !0
    5     6        DO_ICALL                                             $4      
          7        ASSIGN                                                       !1, $4
   14     8        INIT_FCALL                                                   'print_r'
          9        SEND_VAR                                                     !1
         10        DO_ICALL                                                     
         11      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cWmCp
function name:  {closure:/in/cWmCp:7}
number of ops:  7
compiled vars:  !0 = $match
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
    9     1        INIT_FCALL                                                   'md5'
          2        FETCH_DIM_R                                          ~1      !0, 0
          3        SEND_VAL                                                     ~1
          4        DO_ICALL                                             $2      
          5      > RETURN                                                       $2
   10     6*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
228.07 ms | 1998 KiB | 16 Q