3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str="Please wait for sometime too, the area code is for 18 and phone number is too 5897 for"; $str=preg_replace('#(\d)\s*for#','${1}4',$str); $str=preg_replace('#(\d)\s*too#','${1}2',$str); $str=preg_replace('#for\s*(\d)#','4${1}',$str); $str=preg_replace('#too\s*(\d)#','2${1}',$str); echo $str;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JfXBN
function name:  (null)
number of ops:  27
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Please+wait+for+sometime+too%2C+the+area+code+is+for+18+and+phone+number+is+too+5897+for'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%23%28%5Cd%29%5Cs%2Afor%23'
          3        SEND_VAL                                                 '%24%7B1%7D4'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    4     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%23%28%5Cd%29%5Cs%2Atoo%23'
          9        SEND_VAL                                                 '%24%7B1%7D2'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $4      
         12        ASSIGN                                                   !0, $4
    5    13        INIT_FCALL                                               'preg_replace'
         14        SEND_VAL                                                 '%23for%5Cs%2A%28%5Cd%29%23'
         15        SEND_VAL                                                 '4%24%7B1%7D'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $6      
         18        ASSIGN                                                   !0, $6
    6    19        INIT_FCALL                                               'preg_replace'
         20        SEND_VAL                                                 '%23too%5Cs%2A%28%5Cd%29%23'
         21        SEND_VAL                                                 '2%24%7B1%7D'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $8      
         24        ASSIGN                                                   !0, $8
    7    25        ECHO                                                     !0
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
126.29 ms | 1400 KiB | 15 Q