diff options
Diffstat (limited to 'Zend/tests/bug50394.phpt')
-rw-r--r-- | Zend/tests/bug50394.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/tests/bug50394.phpt b/Zend/tests/bug50394.phpt new file mode 100644 index 0000000000..e6069d3666 --- /dev/null +++ b/Zend/tests/bug50394.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #50394: Reference argument converted to value in __call +--FILE-- +<?php +function inc( &$x ) { $x++; } + +class Proxy { + function __call( $name, $args ) { + echo "$name called!\n"; + call_user_func_array( 'inc', $args ); + } +} + +$arg = 1; +$args = array( &$arg ); +$proxy = new Proxy; +call_user_func_array( array( $proxy, 'bar' ), $args ); +call_user_func_array( array( $proxy, 'bar' ), array(&$arg) ); +var_dump($arg); +--EXPECT-- +bar called! +bar called! +int(3) + |