too long

I am working on some project using Apache Ant where I am also using PHP.exe to validate PHP syntax in PHP file.

I am validating the PHP file by using the command as below

php -l index-1.php

And it’s working fine, showing me error when there is some PHP syntax error but the problem is php.exe is not supporting multiple files, it accept only 1 file

I need to pass multiple files. Do you have any solutions for this problem?

The short answer is that php doesn't allow you to supply multiple source codes in one invocation.

Reading between the lines a little, looking at your previous question, it seems you want a single report showing all the lint messages for all your php files.

The <apply> task output attribute can be used to specify the output file for your command, but by default, if the command is run multiple times you only see the output for the last run. If you also add append="true" to your apply task, then the output from all runs will be gathered into the output file. If you also set parallel="false" Ant will run each php file through lint separately.