Data Conversion to JSON in PHP

Using the function json_encode you can automatically convert data in PHP format to JSON format. Let's look at an example. Suppose we have the following array:

php<?php
  $data = [1, 2, 3];
?>

Let's convert it to JSON:

php<?php
  $json = json_encode($data);
?>

Let's check the result:

php<?php
  var_dump($json); // outputs '[1,2,3]'
?>
Задание 1

Convert the following PHP structure into JSON:

php<?php
  $data = [
    'x' => 1,
    'y' => 2,
    'z' => 3,
  ];
?>