I want to find out whether a particular file is valid PHP file or not?
php -l filename
only finds our whether it have syntactical errors or not, it is lint.
But I also want to find out, that on execution, it will run without error or not?
I am running on Ubuntu machine.
EDIT:
Actually my problem is I am allowing users to define formulas for some calculations and I have to execute those formulas, but before submission of formulas by users, I want to make sure whether they are correct or not in PHP