3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function return_json($obj) { ob_start(); header("Content-Type: application/json"); echo json_encode($obj); ob_end_flush(); exit; }
Output for 5.6.38 - 7.2.12