- Output for 5.3.0 - 5.3.23, 5.4.0 - 5.4.13
- Parse error: syntax error, unexpected '{' in /in/0n6vX on line 6
Process exited with code 255.
<?php
$tokens = token_get_all('<?php $a = 1 + 2; echo $a ?>');
foreach($tokens as $token) {
if(is_array(token) {
echo token_name($token[0]);
} else {
echo $token;
}
}