php - How do you execute a method in a class from the command line -
basically have php class that want test commandline , run method. sure basic question, missing docs. know how run file, php -f
not sure how run file class , execute given method
this work:
php -r 'include "myclass.php"; myclass::foo();'
but don't see reasons besides testing though.
Comments
Post a Comment