You can also do a class like this:
PHP Code:
function hello() {
echo("hello from class");
}
then a script like this:
PHP Code:
function onCreated() {
join("classname");
classname::hello();
hello();
}
function hello() {
echo("hello from script");
}
This way you can ensure that you're calling the function in the class.