summaryrefslogtreecommitdiff
path: root/Zend/tests/magic_by_ref_001.phpt
blob: 09d744418f6732c6b36c791735f0e60741a2d5a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--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