test.php <? include func.php ?> <? foo(function($arg)) { ?> <span>test</span> <? } ?> php -l test.php will output: <span>test</span> but in vim, it shows error