1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Files
archived-php-src/ext/opcache/tests/jit/bug81255.phpt
Daniil Gentili 2ca142ecd8 Improve jit tests
Closes GH-12425
2023-11-14 20:09:27 +01:00

32 lines
545 B
PHP

--TEST--
Bug #81255: Memory leak in PHPUnit with functional JIT
--EXTENSIONS--
opcache
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.jit_buffer_size=64M
opcache.jit=function
--FILE--
<?php
eval('class B {}');
class A extends B {
private ?string $x = null;
public function foo($a) {
if (!($this->x = str_repeat($a, 5))) {
throw new Exception('ops');
}
var_dump($this->x);
$this->x = null;
}
}
$a = new A;
$a->foo('a');
$a->foo('b');
?>
--EXPECT--
string(5) "aaaaa"
string(5) "bbbbb"