summaryrefslogtreecommitdiff
path: root/Zend/tests/concat_002.phpt
blob: 4ec4f1fb322a541e426b3c56ff42525a0d8cd3bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Stress test $x .= $x
--FILE--
<?php

/*
 * Test case for a concat_function() change that broke a test outside of Zend
 *
 * @see https://github.com/php/php-src/commit/29397f8fd2b4bc8d95e18448ca2d27a62241a407
**/

$result = 'f';

for ($i = 0; $i < 25; ++$i) {
    $result .= $result;
}

var_dump(strlen($result));
echo "Done\n";
?>
--EXPECT--
int(33554432)
Done