3v4l.org

run code in 500+ 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:  8
compiled vars:  !0 = $wordsList, !1 = $message
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                       !0, <array>
    8     1        FETCH_DIM_R                                          ~3      !0, 0
    9     2        FETCH_DIM_R                                          ~4      !0, 1
    7     3        FRAMELESS_ICALL_3                str_replace         ~5      ~3, ~4
   10     4        OP_DATA                                                      'frog+frog+Nock+Nock'
    7     5        ASSIGN                                                       !1, ~5
   13     6        ECHO                                                         !1
   14     7      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.16 ms | 2024 KiB | 13 Q