how I can use array access with my static class? F.e. I like to execute next script:
class A {
...
}
A['p'] = 15;
echo isset(A['p']) ? A['p'] : 0;
The interface ArrayAccess only works for objects. There's nothing similar for static access.
You can make your class a singleton class then you can access it as static class
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With