Site icon Leonid Mamchenkov

How do you execute a PHP method in a class from the command line?

How do you execute a PHP method in a class from the command line?

php -r 'include "MyClass.php"; MyClass::foo();'

Stack Overflow community is awesome!

Exit mobile version