Skip to content

Commit 4a4de5a

Browse files
authored
trait update
1 parent daf859a commit 4a4de5a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ class miniCar implements Car, Vehicle
442442

443443
### Polymorphism
444444

445-
- Polymorphism represent more than one form, it can be achieved using method overloading and method overriding. This is an object oriented concept where same function can be used for different purposes. For example function name will remain same but it make take different number of arguments (overloading) and can do different task (overriding).
445+
- Polymorphism represent more than one form, it can be achieved using method overloading and method overriding. This is an object oriented concept where same function can be used for different purposes. For example function name will remain same but it may take different number of arguments (overloading) and can do different task (overriding).
446446
- PHP doesn't support traditional method overloading, however one way you might be able to achieve what you want, would be to make use of the __call magic method.
447447

448448
```php
@@ -621,7 +621,7 @@ class MyHelloWorld
621621
use Hello, World;
622622
public function sayExclamationMark()
623623
{
624-
echo '!';
624+
echo $this->sayHello();
625625
}
626626
}
627627

@@ -898,4 +898,4 @@ echo "\n";
898898
$fromSomeCar = clone $someCar;
899899

900900
```
901-
[🔝 Back to contents](#table-of-contents)
901+
[🔝 Back to contents](#table-of-contents)

0 commit comments

Comments
 (0)