3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = 'value 12; another value; yet one more one; val5'; $src = ["value 12", "another value", "yet one more one", "val5"]; $tgt = ["red","green","blue","violet"]; $res = str_replace($src, $tgt, $str); echo $res;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kN8VW
function name:  (null)
number of ops:  8
compiled vars:  !0 = $str, !1 = $src, !2 = $tgt, !3 = $res
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'value+12%3B+another+value%3B+yet+one+more+one%3B+val5'
    4     1        ASSIGN                                                       !1, <array>
    5     2        ASSIGN                                                       !2, <array>
    7     3        FRAMELESS_ICALL_3                str_replace         ~7      !1, !2
          4        OP_DATA                                                      !0
          5        ASSIGN                                                       !3, ~7
    8     6        ECHO                                                         !3
    9     7      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
149.78 ms | 1877 KiB | 13 Q