3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = "as"; $text = $text . '[kav ““”” - &ldquo;&ldquo;&rdquo;&rdquo;]'; $doubleQuotesToReplace = array("“", "”", "&ldquo;", "&rdquo;"); $doubleQuotes = array('"', '"', '"', '"'); $text = str_replace($doubleQuotesToReplace, $doubleQuotes, $text); echo $text;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g9aWU
function name:  (null)
number of ops:  13
compiled vars:  !0 = $test, !1 = $text, !2 = $doubleQuotesToReplace, !3 = $doubleQuotes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'as'
    3     1        CONCAT                                           ~5      !1, '%5Bkav+%E2%80%9C%E2%80%9C%E2%80%9D%E2%80%9D+-+%26ldquo%3B%26ldquo%3B%26rdquo%3B%26rdquo%3B%5D'
          2        ASSIGN                                                   !1, ~5
    5     3        ASSIGN                                                   !2, <array>
    6     4        ASSIGN                                                   !3, <array>
    7     5        INIT_FCALL                                               'str_replace'
          6        SEND_VAR                                                 !2
          7        SEND_VAR                                                 !3
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !1, $9
    8    11        ECHO                                                     !1
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154 ms | 1398 KiB | 15 Q