3v4l.org

run code in 300+ PHP versions simultaneously
<?php $wordsList = [ ['frog', 'Nock'], // All search strings ['sock', 'crock'], // All replacements ]; $message = str_replace( $wordsList[0], // All search strings $wordsList[1], // The replacements strings "frog frog Nock Nock" ); echo $message;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RQjC6
function name:  (null)
number of ops:  11
compiled vars:  !0 = $wordsList, !1 = $message
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL                                               'str_replace'
    8     2        FETCH_DIM_R                                      ~3      !0, 0
          3        SEND_VAL                                                 ~3
    9     4        FETCH_DIM_R                                      ~4      !0, 1
          5        SEND_VAL                                                 ~4
   10     6        SEND_VAL                                                 'frog+frog+Nock+Nock'
    7     7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
   13     9        ECHO                                                     !1
   14    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.92 ms | 1003 KiB | 14 Q