3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if( !function_exists('json_encode') ){ die('json_encode not available yet'); } $data = array('aps' => array( 'alert' => array( 'param1'=>array('string'), 'param2'=>'string' ))); echo json_encode($data);
Output for 5.2.0 - 7.1.0
{"aps":{"alert":{"param1":["string"],"param2":"string"}}}
Output for 4.3.0 - 5.1.6
json_encode not available yet