3v4l.org

run code in 500+ PHP versions simultaneously
<?php $singleLine = ['line 1 first item', 'line 1 second item']; var_dump(str_replace('item', 'ITEM', $singleLine)); $lines = [ ['line 1 first item', 'line 1 second item'], ['line 2 first item', 'line 2 second item'], ]; var_dump(str_replace('item', 'ITEM', $lines));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F6DNs
function name:  (null)
number of ops:  13
compiled vars:  !0 = $singleLine, !1 = $lines
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        INIT_FCALL                                                   'var_dump'
          2        FRAMELESS_ICALL_3                str_replace         ~3      'item', 'ITEM'
          3        OP_DATA                                                      !0
          4        SEND_VAL                                                     ~3
          5        DO_ICALL                                                     
    6     6        ASSIGN                                                       !1, <array>
   10     7        INIT_FCALL                                                   'var_dump'
          8        FRAMELESS_ICALL_3                str_replace         ~6      'item', 'ITEM'
          9        OP_DATA                                                      !1
         10        SEND_VAL                                                     ~6
         11        DO_ICALL                                                     
         12      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
215.31 ms | 3471 KiB | 14 Q