fork download
  1. <?php
  2. $arr = array(array('id' => 1, 'name' => 'fulano', 'email' => 'fulano@abc.com'));
  3. echo json_encode(...$arr);
Success #stdin #stdout 0.02s 23712KB
stdin
Standard input is empty
stdout
{"id":1,"name":"fulano","email":"fulano@abc.com"}