What version of PHP are you using? As of 5.3, line numbers are included in lint output:
[charles@server ~]$ cat syntax_error.php
<?php
echo "This line is legal\n";
echo I'm a syntax error!\n;
echo "This line never gets reached.\n"
[charles@server ~]$ php -l syntax_error.php
PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ',' or ';' in syntax_error.php on line 3
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ',' or ';' in syntax_error.php on line 3
Errors parsing syntax_error.php
[charles@server ~]$
The error appears twice because it's going to both stdout and stderr. It's been a long time since I've worked with batch files on Windows, maybe the version you're using only emits the error on stderr, and the batch file is discarding the output of stderr?