<?php
$flat = ['a', 'b', 'c'];
$treeish = ['a', 'b' => ['x', 'y', 'z'], 'c'];
$count_my_leaves = ['a' => ['uni', 'doni'], 'b' => ['trini'], 'c' => ['pani', 'is', 'pis', 'conopis']];
echo 'count($flat): ' . count($flat) . PHP_EOL;
echo 'count($flat, 1): ' . count($flat, 1) . PHP_EOL;
echo 'count($treeish): ' . count($treeish) . PHP_EOL;
echo 'count($treeish, 1): ' . count($treeish, 1) . PHP_EOL;
echo 'count($count_my_leaves, 1) - count($count_my_leaves): ' . (count($count_my_leaves, 1) - count($count_my_leaves)) . PHP_EOL;
preferences:
47.35 ms | 402 KiB | 5 Q