3v4l.org

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

preferences:
65.96 ms | 406 KiB | 5 Q