array(2) {
["foo"]=>
float(3)
["bar"]=>
float(3.1)
}
{"foo":3.0,"bar":3.1}
Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in /in/rNUMJ:7
Stack trace:
#0 {main}
thrown in /in/rNUMJ on line 7
Process exited with code 255.
array(2) {
["foo"]=>
float(3)
["bar"]=>
float(3.1)
}
{"foo":3.0,"bar":3.1}
Recoverable fatal error: Object of class stdClass could not be converted to string in /in/rNUMJ on line 7
Process exited with code 255.
Output for 5.6.6 - 5.6.40, 7.0.0 - 7.0.33
array(2) {
["foo"]=>
float(3)
["bar"]=>
float(3.1)
}
{"foo":3.0,"bar":3.1}
Catchable fatal error: Object of class stdClass could not be converted to string in /in/rNUMJ on line 7
Process exited with code 255.
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.5
array(2) {
["foo"]=>
float(3)
["bar"]=>
float(3.1)
}
Notice: Use of undefined constant JSON_PRESERVE_ZERO_FRACTION - assumed 'JSON_PRESERVE_ZERO_FRACTION' in /in/rNUMJ on line 6
Warning: json_encode() expects parameter 2 to be long, string given in /in/rNUMJ on line 6
Catchable fatal error: Object of class stdClass could not be converted to string in /in/rNUMJ on line 7
Process exited with code 255.