note 76259 added to language.oop5.overloading
| From: | alexandre at nospam dot gaigalas dot net | Date: | Sun, 08 Jul 2007 05:59:35 +0000 |
| Subject: | note 76259 added to language.oop5.overloading | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-128295@lists.php.net to get a copy of this message | ||
PHP 5.2.1
Its possible to call magic methods with invalid names using variable method/property names:
<?php
class foo
{
function __get($n)
{
print_r($n);
}
function __call($m, $a)
{
print_r($m);
}
}
$test = new foo;
$varname = 'invalid,variable+name';
$test->$varname;
$test->$varname();
?>
I just don't know if it is a bug or a feature :)
----
Server IP: 69.147.83.197
Probable Submitter: 189.29.194.38
----
Manual Page -- http://www.php.net/manual/en/language.oop5.overloading.php
Edit -- https://master.php.net/note/edit/76259
Del: integrated -- https://master.php.net/note/delete/76259/integrated
Del: useless -- https://master.php.net/note/delete/76259/useless
Del: bad code -- https://master.php.net/note/delete/76259/bad+code
Del: spam -- https://master.php.net/note/delete/76259/spam
Del: non-english -- https://master.php.net/note/delete/76259/non-english
Del: in docs -- https://master.php.net/note/delete/76259/in+docs
Del: other reasons-- https://master.php.net/note/delete/76259
Reject -- https://master.php.net/note/reject/76259
Search -- https://master.php.net/manage/user-notes.php