xref: /PHP-7.4/ext/opcache/tests/opt/dce_009.phpt (revision 0826a548)
1--TEST--
2Incorrect DCE of FREE of COALESCE
3--FILE--
4<?php
5
6function test(?string $str) {
7    $str ?? $str = '';
8    return strlen($str);
9}
10
11$foo = 'foo';
12$foo .= 'bar';
13var_dump(test($foo));
14
15?>
16--EXPECT--
17int(6)
18