Formatting update (#32851)
Removed a line break to maintain great formatting techniques.pull/31060/head^2
parent
22feda827a
commit
c3cc035d5a
|
@ -229,10 +229,8 @@ echo "\n\t" . $jack->beStubborn();
|
|||
echo "\n\t" . $jack->notPutToiletPaper();
|
||||
```
|
||||
|
||||
Now, we don’t have to set Jack’s name, age and height separately and print them anymore. Whenever we create Jack object, we just specify his properties as the parameters and they will get printed automatically by the help of the constructor. We can also put his favorite sports and drinks in the parameter if we want by
|
||||
Now, we don’t have to set Jack’s name, age and height separately and print them anymore. Whenever we create Jack object, we just specify his properties as the parameters and they will get printed automatically by the help of the constructor. We can also put his favorite sports and drinks in the parameter if we want by specifying them as parameters while creating the object and putting the echo lines inside the constructor.
|
||||
|
||||
specifying them as parameters while creating the object and
|
||||
putting the echo lines inside the constructor.
|
||||
You can visit here for more information on PHP implementation of constructors. Our OOP journey has been slow but steady.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue