D
D
DeniSidorenko2020-03-28 08:48:48
PHP
DeniSidorenko, 2020-03-28 08:48:48

What's the difference between private static or private, php?

Good afternoon, I'm making a class connection to the database. I declare private $instance;
When accessing via self::$instance, it gives an error, but if I do it , everything is OK. The question is why is this happening? private static $instance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2020-03-28
@DeniSidorenko

Because that's how language works .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question