NOTE: when you call code by eval() PHP append self vars to result, they have "__" prefix ("__source_code" and "__bootstrap_file" in PHP 7.3).
Fix:
<?php
function filter_eval_vars(array $vars): array
{
foreach ($vars as $key => $value) {
if ($key[0] === '_' && $key[1] === '_') {
unset($vars[$key]);
}
}
return $vars;
}
?>