note 97199 added to language.oop5.basic
| From: | krishansharma25 at gmail dot com | Date: | Thu, 08 Apr 2010 07:58:21 +0000 |
| Subject: | note 97199 added to language.oop5.basic | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168001@lists.php.net to get a copy of this message | ||
<?php
error_reporting( E_STRICT);
class SimpleClass
{
public $var = 'a default value';
public function displayVar($a) {
echo $this->var."++".$a."<br>";
}
}
class SimpleClass2 extends SimpleClass
{
public $var = 'a default value in sub class';
public function displayVar($a,$b) {
echo $this->var."++".$a."****".$b."<br>";
}
}
$obj = new SimpleClass2();
$obj->displayVar("aaa");
?>
Above code should give an e_strict message but it does not.(When overriding methods, the parameter
signature should remain the same or PHP will generate an E_STRICT level error. This does not apply
to the constructor, which allows overriding with different parameters. )
Is there any updation in php or i am missing somethig.
Please revert if someone know its reason...
----
Server IP: 59.162.86.8
Probable Submitter: 122.160.26.178
----
Manual Page -- http://www.php.net/manual/en/language.oop5.basic.php
Edit -- https://master.php.net/note/edit/97199
Del: integrated -- https://master.php.net/note/delete/97199/integrated
Del: useless -- https://master.php.net/note/delete/97199/useless
Del: bad code -- https://master.php.net/note/delete/97199/bad+code
Del: spam -- https://master.php.net/note/delete/97199/spam
Del: non-english -- https://master.php.net/note/delete/97199/non-english
Del: in docs -- https://master.php.net/note/delete/97199/in+docs
Del: other reasons-- https://master.php.net/note/delete/97199
Reject -- https://master.php.net/note/reject/97199
Search -- https://master.php.net/manage/user-notes.php