When should this and self use private static $ case_l_step_end;
Private $ single_step;
The above one can be called using self, and the following is called using this.
The written classes are instantiated objects. Only the methods in the class are recursive, private static $ case_l_step_end; this attribute is useful for recursion.
The question is:
Var_dump ($ this-> single_step); this value can be obtained if it is a number, and other things cannot be taken.
Var_dump (self: $ case_l_step_end); you can obtain the value.
When to add static member variables?
Reply to discussion (solution)
Paste your code.
Otherwise, I will post a textbook to you. would you like it?
There are a lot of code in this class. can I send it to you privately?
Paste your code.
Otherwise, I will post a textbook to you. would you like it?
Paste your code.
Otherwise, I will post a textbook to you. would you like it?
You only need to paste the relevant part.
It mainly depends on how you write
This cannot call static attributes.
Self: non-static attributes cannot be called.
B; echo $ this-> a; // this call static property error echo self: $ B; // error in calling non-static properties by self} $ o = new test (); $ o-> run ();?>
This cannot call static attributes.
Self: non-static attributes cannot be called.
B; echo $ this-> a; // this call static property error echo self: $ B; // error in calling non-static properties by self} $ o = new test (); $ o-> run ();?>
Thank you.
You only need to paste the relevant part.
It mainly depends on how you write
The error is that when I write if, I write =
Solved. Thank you.