3v4l.org

run code in 300+ 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:  11
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        INIT_FCALL                                               'str_replace'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
    8     9        ECHO                                                     !3
    9    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.38 ms | 996 KiB | 14 Q