fork(40) download
  1. <?PHP
  2.  
  3. $json = array();
  4. $itemObject = new stdClass();
  5. $itemObject->ip = "192.168.0.1";
  6. $itemObject->port = 2016;
  7.  
  8. array_push($json, $itemObject);
  9. $json = json_encode($json, JSON_PRETTY_PRINT);
  10. echo $json;
  11.  
  12. ?>
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
	[
    {
        "ip": "192.168.0.1",
        "port": 2016
    }
]