Annotation of embedaddon/php/ext/spl/tests/SplFixedArray_offsetUnset_string.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Check removing an item from an array when the offset is not an integer.
                      3: --CREDITS--
                      4: PHPNW Testfest 2009 - Paul Court ( g@rgoyle.com )
                      5: --FILE--
                      6: <?php
                      7:        // Create a fixed array
                      8:        $fixedArray = new SplFixedArray(5);
                      9:        
                     10:        // Fill it up
                     11:        for ($i=0; $i < 5; $i++) { 
                     12:                $fixedArray[$i] = "PHPNW Testfest";
                     13:        }
                     14:        
                     15:        // remove an item
                     16:        $fixedArray->offsetUnset("4");
                     17:        
                     18:        var_dump($fixedArray);
                     19:        
                     20: ?>
                     21: --EXPECTF--
                     22: object(SplFixedArray)#1 (5) {
                     23:   [0]=>
                     24:   %string|unicode%(14) "PHPNW Testfest"
                     25:   [1]=>
                     26:   %string|unicode%(14) "PHPNW Testfest"
                     27:   [2]=>
                     28:   %string|unicode%(14) "PHPNW Testfest"
                     29:   [3]=>
                     30:   %string|unicode%(14) "PHPNW Testfest"
                     31:   [4]=>
                     32:   NULL
                     33: }

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