ext-php-rs
ext-php-rs copied to clipboard
Static property and method
How to add static property and method?
pub fn hello( q: String) -> String {
format!("hello {}", q)
}
@arshidkv12 I believe just that should work for static methods. From the docs:
Class methods can take a
&selfor&mut selfparameter. They cannot take a consumingselfparameter. Static methods can omit thisselfparameter.
I want code as follows.
PHP
class my class{
static $a = 1;
public static function hello(){
}
}