3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Primary { public function __toString() { $GLOBALS['anObject'] = $this; return 'toString output from Primary'; } } $Foo = new Primary; str_replace('', '', $Foo); var_dump($GLOBALS['anObject']);

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
168.22 ms | 2697 KiB | 12 Q