3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ function do_stuff(&$b) { $defined = 0; #trigger_error("If I fixed the undefined variable but enabled this line instead, it will also turn b from an object into a string! So user-triggered notices bork it as well."); $x = $undefined || $defined ? 14 : 0; var_dump('In function:', $b); } } class B{} $a = new A(); $b = new B(); $a->do_stuff($b); var_dump('After function:', $b);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
156.25 ms | 3349 KiB | 11 Q