3v4l.org

run code in 300+ PHP versions simultaneously
<?php $object = new StdClass; $object->foo = 1; $object->bar = 2; // object to array $arr = (array) $object; var_dump( $arr ); // and back to array $obj = (object) $arr; var_dump( $obj );

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
164.38 ms | 3367 KiB | 9 Q