How we run php script using linux bash ?
php file test.php
<?php echo "hello\n" ?>
From the command line enter this:
php -f filename.php
Make sure that filename.php both includes and executes the function you want to test. Anything you echo out will appear in the console including errors.
Be wary that often the php.ini for Apache PHP is different from CLI PHP (command line interface).