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!

Leave a Comment