<?phpclass Example { function foo() { echo "foo!\n"; } }// create an Example object$e = new Example();// Add a new public methodclasskit_method_add( 'Example', 'add', '$num1, $num2', 'return $num1 + $num2;', CLASSKIT_ACC_PUBLIC);// add 12 + 4echo $e->add(12, 4);?>
The above example will output:
16