3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach ( [ false, null, [], '', '0', '0.0' ] as $value ) { $value = str_replace( ' ', "\n", $value ); if ( is_array( $value ) ) { $value = implode( "\n", $value ); } var_dump( $value ); }

preferences:
45.27 ms | 406 KiB | 5 Q