diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2003-07-29 17:56:50 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2003-07-29 17:56:50 +0000 |
| commit | 7b18132dbab996cd4a7962907e45a2925ca3544d (patch) | |
| tree | fdf97c2d253ff858af09c2fba281814ef70f04d9 | |
| parent | a5a859361be2537f8c1c1053b8403ce9136b381d (diff) | |
| download | php-git-7b18132dbab996cd4a7962907e45a2925ca3544d.tar.gz | |
Test case for bug #22836.
| -rw-r--r-- | Zend/tests/bug22836.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/tests/bug22836.phpt b/Zend/tests/bug22836.phpt new file mode 100644 index 0000000000..14c9e9f3ed --- /dev/null +++ b/Zend/tests/bug22836.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #22836 (returning references to NULL) +--SKIPIF-- +<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 is needed'); ?> +--FILE-- +<?php +function &f() +{ + $x = "foo"; + var_dump($x); + print "'$x'\n"; + return ($a); +} +for ($i = 0; $i < 8; $i++) { + $h =& f(); +} +?> +--EXPECTF-- +string(3) "foo" +'foo' + +Notice: Undefined variable: a in %s on line %d + +Fatal error: Only variables or references can be returned by reference in %s on line %d |
