3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = str_replace( ' ', "\n", 'abc efg hij' ); $value = str_replace( ' ', "\n", array( 'abc', 'efg', 'hij' ) ); // What about for boolean, int, float? $value = str_replace( ' ', "\n", false ); $value = str_replace( ' ', "\n", -100 ); $value = str_replace( ' ', "\n", 100.25 ); // What about an object? $option = new stdClass; $value = str_replace( ' ', "\n", $option );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0kUkn
function name:  (null)
number of ops:  40
compiled vars:  !0 = $value, !1 = $option
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'str_replace'
          1        SEND_VAL                                                 '+'
          2        SEND_VAL                                                 '%0A'
          3        SEND_VAL                                                 'abc+efg+hij'
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !0, $2
    4     6        INIT_FCALL                                               'str_replace'
          7        SEND_VAL                                                 '+'
          8        SEND_VAL                                                 '%0A'
          9        SEND_VAL                                                 <array>
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !0, $4
    7    12        INIT_FCALL                                               'str_replace'
         13        SEND_VAL                                                 '+'
         14        SEND_VAL                                                 '%0A'
         15        SEND_VAL                                                 <false>
         16        DO_ICALL                                         $6      
         17        ASSIGN                                                   !0, $6
    8    18        INIT_FCALL                                               'str_replace'
         19        SEND_VAL                                                 '+'
         20        SEND_VAL                                                 '%0A'
         21        SEND_VAL                                                 -100
         22        DO_ICALL                                         $8      
         23        ASSIGN                                                   !0, $8
    9    24        INIT_FCALL                                               'str_replace'
         25        SEND_VAL                                                 '+'
         26        SEND_VAL                                                 '%0A'
         27        SEND_VAL                                                 100.25
         28        DO_ICALL                                         $10     
         29        ASSIGN                                                   !0, $10
   12    30        NEW                                              $12     'stdClass'
         31        DO_FCALL                                      0          
         32        ASSIGN                                                   !1, $12
   13    33        INIT_FCALL                                               'str_replace'
         34        SEND_VAL                                                 '+'
         35        SEND_VAL                                                 '%0A'
         36        SEND_VAR                                                 !1
         37        DO_ICALL                                         $15     
         38        ASSIGN                                                   !0, $15
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.43 ms | 1396 KiB | 15 Q