- array_map: documentation ( source)
- token_get_all: documentation ( source)
- token_name: documentation ( source)
<?php
array_map(
function ($token) {
if (is_array($token)) {
echo token_name($token[0]) . ', ';
}
},
token_get_all('<?php $a = [1]; $b = array (1); ')
);