3v4l.org

run code in 300+ PHP versions simultaneously
<?php $base="www.youtube.com"; $mydomain="www.pippobruco.it"; $stringa="wwww.youtube.com/watch"; echo str_replace($base,$mydomain."/".$base,$stringa);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EhSDG
function name:  (null)
number of ops:  12
compiled vars:  !0 = $base, !1 = $mydomain, !2 = $stringa
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'www.youtube.com'
    3     1        ASSIGN                                                   !1, 'www.pippobruco.it'
    4     2        ASSIGN                                                   !2, 'wwww.youtube.com%2Fwatch'
    5     3        INIT_FCALL                                               'str_replace'
          4        SEND_VAR                                                 !0
          5        CONCAT                                           ~6      !1, '%2F'
          6        CONCAT                                           ~7      ~6, !0
          7        SEND_VAL                                                 ~7
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                         $8      
         10        ECHO                                                     $8
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.91 ms | 1394 KiB | 15 Q