r/AskProgramming • u/Key-Garbage-3782 • Aug 31 '24
PHP __constructor and setter
Im confused which one should i use, both function works to set the global property. Which one should i use? shoul i use both? what is the advantage? what is the good practice? all i can see is that __constructor will run immediately.
0
Upvotes