class Methodmytable { public static function testFunction( $arg1, $arg2, &$mytable ) { $mytable->set( 'tested', true ); return sprintf( "testing for $arg1 and $arg2 on %s", $mytable->get( 'myField' ) ); } }