Voting

: eight plus one?
(Example: nine)

The Note You're Voting On

alexandre at nospam dot gaigalas dot net
18 years ago
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 :)

<< Back to user notes page

To Top