xref: /php-src/ext/opcache/tests/jit/gh16009.phpt (revision daba40c6)
1--TEST--
2GH-16009 (Segmentation fault with frameless functions and undefined CVs)
3--EXTENSIONS--
4opcache
5--INI--
6opcache.jit=1012
7--FILE--
8<?php
9function testMin2Second(): int {
10    $value = min(100, $value);
11    return $value;
12}
13testMin2Second();
14?>
15--EXPECTF--
16Warning: Undefined variable $value in %s on line %d
17
18Fatal error: Uncaught TypeError: testMin2Second(): Return value must be of type int, null returned in %s:%d
19Stack trace:
20#0 %s(%d): testMin2Second()
21#1 {main}
22  thrown in %s on line %d
23