Method
Methods are functions, dedicated to a class. They are defined inside the body of a class, and may only be accessed in relation to that class: via an object, the class name or another method.
Methods are defined in traits, and then imported in a class for usage.
Methods are also called member functions. Indeed, they are functions, but they belong to an object, just like a member, or property. This is less used.
<?php
class X {
public function foo() {
echo "I am foo!\n";
}
}
$x = new Y();
$y->foo(); // calling the foo method, defined in x,
?>