调用运行bash脚本的某些php脚本函数

I have a php script (functions.inc):

<?php  
function exec_mount_secured_bucket(){  
exec("/ilantest/testscript.sh");  
}  
?>  

I would like to run that function from inside the shell, normally to run the script using php i would do:
php function.inc
But I want to call a certain function from that function file.

How to do it ?

Thanks.

You can use the command line switches for this purpose:

--process-end code
-E code        Run PHP code after processing all input lines

This should do the job:

php -E 'exec_mount_secured_bucket();' function.inc

Create a file like this:

launcher.php

<?php
    include 'functions.inc';
    exec_mount_secured_bucket();

Then in your bash script:

php launcher.php