Someone
public text v1 · immutable<?php
$source = file_get_contents('/var/www/html/index.php');
$tokens = token_get_all($source);
foreach ($tokens as $token) {
// if (is_string($token)) {
// simple 1-character token
//echo $token;
// } else {
// token array
list($id, $text) = $token;
switch ($id) {
case T_CONSTANT_ENCAPSED_STRING:
//case T_PRINT:
echo $text;
break;
default:
// anything else -> output "as is"
//echo $text;
break;
}
//}
}
?>