Annotation of embedaddon/php/Zend/tests/bug40809.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #40809 (Poor perfomance of ".=")
                      3: --FILE--
                      4: <?php
                      5: error_reporting(E_ALL|E_STRICT);
                      6: 
                      7: $num_increments = 100;
                      8: $num_repeats = 1000;
                      9: $increment = 50;
                     10: 
                     11: /* Create some more holes to give the memory allocator something to
                     12:  * work with. */
                     13: $num = 5000;
                     14: $a = Array();
                     15: for ($i=0; $i<$num; $i++) {
                     16:   $a[$i] = Array(1);
                     17: }
                     18: for ($i=0; $i<$num; $i++) {
                     19:   $b[$i] = $a[$i][0];
                     20: }
                     21: unset($a);
                     22: 
                     23: for ($i=0;$i<$num_repeats;$i++) {
                     24:   $evil = "";
                     25:   for ($j=0;$j<$num_increments;$j++) {
                     26:     $evil .= str_repeat("a", $increment);
                     27:   }
                     28:   unset($evil);
                     29: }
                     30: echo "ok\n";
                     31: ?>
                     32: --EXPECT--
                     33: ok

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>