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:
153.65 ms | 2698 KiB | 10 Q