3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "blah &#038; blarh"; $searchReplaceArray = array( '&#038;' => '&', ); $result = str_replace( array_keys($searchReplaceArray), array_values($searchReplaceArray), $string ); echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bdRAE
function name:  (null)
number of ops:  16
compiled vars:  !0 = $string, !1 = $searchReplaceArray, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'blah+%26%23038%3B+blarh'
    4     1        ASSIGN                                                   !1, <array>
    7     2        INIT_FCALL                                               'str_replace'
    8     3        INIT_FCALL                                               'array_keys'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        SEND_VAR                                                 $5
    9     7        INIT_FCALL                                               'array_values'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $6      
         10        SEND_VAR                                                 $6
   10    11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $7      
    7    13        ASSIGN                                                   !2, $7
   13    14        ECHO                                                     !2
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.13 ms | 1394 KiB | 19 Q