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

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 249 bytes
Line 
1--TEST--
2Bug #72216 (Return by reference with finally is not memory safe)
3--FILE--
4<?php
5function &test() {
6    $a = ["ok"];
7    try {
8        return $a[0];
9    } finally {
10        $a[""] = 42;
11    }
12}
13var_dump(test());
14?>
15--EXPECT--
16string(2) "ok"
Note: See TracBrowser for help on using the repository browser.