- json_encode: documentation ( source)
<?php
$statistics = json_encode( [
'Strength' => 9,
'Constitution' => 6,
'Dexterity' => 5,
'Intelligence' => 9,
'Wisdom' => 4,
'Charisma' => 10,
]);
echo get_type($statistics);
?>