If I want to execute a php script, i just point the browser to www.something.com/myscript.php
www.something.com/myscript.php
But if i want to execute a specific function inside
You will have to expose it in some way. This is because exposing all methods public, would be a security risk.
Example.php
Then just call:
http://www.example.com/Example.php?calculate-length&value=My%20example