mirror of
https://github.com/php/php-src.git
synced 2024-12-21 16:00:18 +08:00
18 lines
283 B
PHP
18 lines
283 B
PHP
--TEST--
|
|
passing first parameter of __set() by ref
|
|
--FILE--
|
|
<?php
|
|
|
|
class test {
|
|
function __set(&$name, $val) { }
|
|
}
|
|
|
|
$t = new test;
|
|
$name = "prop";
|
|
$t->$name = 1;
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Method test::__set() cannot take arguments by reference in %s on line %d
|