3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.32 ms | 1394 KiB | 19 Q