3v4l.org

run code in 300+ PHP versions simultaneously
<?php function func(string $foo){ } try { func(null); } catch (Error $e){ echo $e->getMessage()."\n"; } try { func(array()); } catch (Error $e){ echo $e->getMessage()."\n"; } try { func((object)array()); } catch (Error $e){ echo $e->getMessage()."\n"; } try { func(fopen("php://stdout", "w")); } catch (Error $e){ echo $e->getMessage()."\n"; }

preferences:
47.41 ms | 404 KiB | 5 Q