mirror of
https://github.com/php/php-src.git
synced 2024-10-04 16:26:13 +00:00
6d8760677d
- altered EXPECT for parser errors. This may or may not be a Good Thing.
30 lines
430 B
PHP
30 lines
430 B
PHP
--TEST--
|
|
passing arguments by ref to a method handled by __call()
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo {
|
|
function __call($method, $args)
|
|
{
|
|
print $args[0]."\n";
|
|
$args[0] = 5;
|
|
print $args[0]."\n";
|
|
return true;
|
|
}
|
|
}
|
|
|
|
$v = 'str';
|
|
$o = new Foo();
|
|
$o->test(&$v);
|
|
|
|
var_dump($v);
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
|
|
str
|
|
5
|
|
int(5)
|
|
Done
|