3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test( $limited_email_domains ) { $limited_email_domains = str_replace( ' ', "\n", $limited_email_domains ); var_dump( gettype( $limited_email_domains ) ); } test( 0 ); test( false ); test( '' ); test( array( 'foo', 'bar', 'baz' ) ); // This one will throw a fatal error as str_replace's third param must be string or array. test( (object) array( 'foo', 'bar', 'baz' ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Lfmgp
function name:  (null)
number of ops:  17
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'test'
          1        SEND_VAL                                                 0
          2        DO_FCALL                                      0          
   10     3        INIT_FCALL                                               'test'
          4        SEND_VAL                                                 <false>
          5        DO_FCALL                                      0          
   11     6        INIT_FCALL                                               'test'
          7        SEND_VAL                                                 ''
          8        DO_FCALL                                      0          
   12     9        INIT_FCALL                                               'test'
         10        SEND_VAL                                                 <array>
         11        DO_FCALL                                      0          
   15    12        INIT_FCALL                                               'test'
         13        CAST                                          8  ~4      <array>
         14        SEND_VAL                                                 ~4
         15        DO_FCALL                                      0          
         16      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Lfmgp
function name:  test
number of ops:  12
compiled vars:  !0 = $limited_email_domains
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '+'
          3        SEND_VAL                                                 '%0A'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6        ASSIGN                                                   !0, $1
    6     7        INIT_FCALL                                               'var_dump'
          8        GET_TYPE                                         ~3      !0
          9        SEND_VAL                                                 ~3
         10        DO_ICALL                                                 
    7    11      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.94 ms | 957 KiB | 20 Q