Skip to content

Instantly share code, notes, and snippets.

@v6ak
Created September 12, 2010 19:11
Show Gist options
  • Select an option

  • Save v6ak/576344 to your computer and use it in GitHub Desktop.

Select an option

Save v6ak/576344 to your computer and use it in GitHub Desktop.
#!/bin/bash
cat "$1" \
| php -r \
'foreach(token_get_all(file_get_contents("php://stdin")) as $token){
echo is_array($token)
?token_name($token[0]).":\t$token[1]\n"
:"$token\n";
};' \
| less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment