3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = '[{ "enquete_id" : 1, "opcao_id" : 1 }, { "enquete_id" : 2, "opcao_id" : 1 }]'; $params = json_decode($request->getBody(),true); print_r($params);
Output for 7.0.5 - 7.1.0
Notice: Undefined variable: request in /in/cOqSl on line 3 Fatal error: Uncaught Error: Call to a member function getBody() on null in /in/cOqSl:3 Stack trace: #0 {main} thrown in /in/cOqSl on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: request in /in/cOqSl on line 3 Fatal error: Uncaught Error: Call to a member function getBody() on unknown in /in/cOqSl:3 Stack trace: #0 {main} thrown in /in/cOqSl on line 3
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Notice: Undefined variable: request in /in/cOqSl on line 3 Fatal error: Call to a member function getBody() on null in /in/cOqSl on line 3
Process exited with code 255.
Output for 5.2.0 - 5.5.38
Notice: Undefined variable: request in /in/cOqSl on line 3 Fatal error: Call to a member function getBody() on a non-object in /in/cOqSl on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Call to undefined function json_decode() in /in/cOqSl on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: json_decode() in /in/cOqSl on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: json_decode() in /in/cOqSl on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: json_decode() in /in/cOqSl on line 3