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

Popular posts from this blog

php - How to build a web site which gives a sub-domain dynamically to every registered user? -

android - View with visibility state GONE taking up space on screen -