<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

$phpArr = [
    "vorname" => "Daniel",
    "nachname" => "C",
    "schule" => "wvss",
    "hatFuehrerschein" => true,
    "alter" => 67
];


$phpJson = json_encode($phpArr);
echo "arr into json transfered<br>";

$file = file_put_contents("daniel.json", $phpJson);
echo "file created<br>";