3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = '1,2,3,\n,4,5,6,\n,7,8,9'; $search = ','; $replace = ''; var_dump( str_replace( $search, $replace, explode('\n',$data) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R2eTd
function name:  (null)
number of ops:  16
compiled vars:  !0 = $data, !1 = $search, !2 = $replace
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '1%2C2%2C3%2C%5Cn%2C4%2C5%2C6%2C%5Cn%2C7%2C8%2C9'
    3     1        ASSIGN                                                   !1, '%2C'
    4     2        ASSIGN                                                   !2, ''
    5     3        INIT_FCALL                                               'var_dump'
    6     4        INIT_FCALL                                               'str_replace'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
    7     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '%5Cn'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                         $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                                 
    9    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.68 ms | 1394 KiB | 19 Q