<?php $a = ['name' => 'John Doe']; $b = new stdClass; $b->name = 'John Doe'; echo json_encode($a, JSON_PRETTY_PRINT) . PHP_EOL; echo json_encode($b, JSON_PRETTY_PRINT);
You have javascript disabled. You will not be able to edit any code.