source: src/router/php7/Zend/tests/bug74164.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 4 months ago

update php

File size: 579 bytes
Line 
1--TEST--
2Bug #74164 (PHP hangs when an invalid value is dynamically passed to typehinted by-ref arg)
3--FILE--
4<?php
5
6namespace Foo;
7
8set_error_handler(function ($type, $msg) {
9        throw new \Exception($msg);
10});
11
12call_user_func(function (array &$ref) {var_dump("xxx");}, 'not_an_array_variable');
13?>
14--EXPECTF--
15Fatal error: Uncaught Exception: Parameter 1 to Foo\{closure}() expected to be a reference, value given in %sbug74164.php:%d
16Stack trace:
17#0 [internal function]: Foo\{closure}(%s)
18#1 %sbug74164.php(%d): call_user_func(%s)
19#2 {main}
20  thrown in %sbug74164.php on line %d
Note: See TracBrowser for help on using the repository browser.