3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ptn = "/^+44/"; // Regex $str = "+447738351383"; //Your input, perhaps $_POST['textbox'] or whatever $rpltxt = "0"; // Replacement string echo preg_replace($ptn, $rpltxt, $str); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dM1XI
function name:  (null)
number of ops:  10
compiled vars:  !0 = $ptn, !1 = $str, !2 = $rpltxt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2F%5E%2B44%2F'
    3     1        ASSIGN                                                   !1, '%2B447738351383'
    4     2        ASSIGN                                                   !2, '0'
    5     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8        ECHO                                                     $6
    6     9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.56 ms | 1398 KiB | 15 Q