xref: /PHP-8.1/ext/opcache/tests/opt/sccp_021.phpt (revision e9f783fc)
1--TEST--
2SCCP 021: Memleak
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7;opcache.opt_debug_level=0x20000
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12class A {
13    public function memleak($num_tokens) {
14        $queries = array();
15        for ( $i = 0; $i < $num_tokens; ++$i ) {
16            if ( 0 < $i )
17                $queries[$i] = $queries[$i - 1] . '&';
18            else
19                $queries[$i] = '';
20
21            $queries[$i] .= $query_token;
22        }
23
24        return;
25    }
26}
27?>
28okey
29--EXPECT--
30okey
31