I need to execute a function using exec command in php. I have this: exec("php ./myfile.php >> ./log.txt &");
But I want to execute an specific function "myFunction" in myfile.php
How could I do this?
<?php
class A {
exec("php ./myfile.php >> ./log.txt &");
}
?>
myfile.php
<?php
class B {
function myFunction(){
....
}
function otherFunction(){
....
}
}
?>
I need to throw several functions as a parallel processes