File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug40261.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

    1: --TEST--
    2: Bug #40261 (Extremely slow data handling due to memory fragmentation)
    3: --INI--
    4: memory_limit=128M
    5: --FILE--
    6: <?php
    7: $num = 100000;
    8: 
    9: $a = Array();
   10: for ($i=0; $i<$num; $i++) {
   11:   $a[$i] = Array(1);
   12: }
   13: 
   14: for ($i=0; $i<$num; $i++) {
   15:   $b[$i] = $a[$i][0];
   16: }
   17: 
   18: unset($a);
   19: for ($i=0; $i<$num; $i++) {
   20:   $b[$i] = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
   21: }
   22: echo "ok\n";
   23: ?>
   24: --EXPECT--
   25: ok

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