summaryrefslogtreecommitdiff
path: root/Zend/tests/magic_by_ref_001.phpt
blob: e9bcf8fa2878f4fde0911633ca214069433e0d6c (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