3v4l.org

run code in 500+ 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:  9
compiled vars:  !0 = $limited_email_domains
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        FRAMELESS_ICALL_3                str_replace         ~1      '+', '%0A'
          2        OP_DATA                                                      !0
          3        ASSIGN                                                       !0, ~1
    6     4        INIT_FCALL                                                   'var_dump'
          5        GET_TYPE                                             ~3      !0
          6        SEND_VAL                                                     ~3
          7        DO_ICALL                                                     
    7     8      > RETURN                                                       null

End of function test

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.13 ms | 2181 KiB | 19 Q