Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class first {
- public function something($param1) {
- return 'first-'.$param1;
- }
- }
- class second extends first {
- public function something($param1, $param2) {
- return 'second params=('.$param1.','.$param2.')';
- }
- }
- // Strict standards: Declaration of second::something() should be compatible with that of first::something() in /home/szymon/webs/wildcard/www/source/public/override.php on line 13
- $myClass = new Second();
- var_dump( $myClass->something(123,456) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement