3v4l.org

run code in 300+ PHP versions simultaneously
<?php function example($foo) { print $foo; } // Prints ``, nothing. example(null); // Prints `1`, boolean is cast to integer and cast to a string. example(true); // Prints `0` example(0); // Fatal error: Object of class stdClass could not be converted to string. example(new \stdClass);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
181.24 ms | 1487 KiB | 12 Q