]> granicus.if.org Git - php/commitdiff
Added test case to complement commit 29397f8
authorTjerk Meesters <datibbaw@php.net>
Sat, 6 Sep 2014 10:56:22 +0000 (18:56 +0800)
committerTjerk Meesters <datibbaw@php.net>
Sat, 6 Sep 2014 10:57:03 +0000 (18:57 +0800)
Zend/tests/concat_002.phpt [new file with mode: 0644]

diff --git a/Zend/tests/concat_002.phpt b/Zend/tests/concat_002.phpt
new file mode 100644 (file)
index 0000000..3cb182e
--- /dev/null
@@ -0,0 +1,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
+