Annotation of embedaddon/php/tests/lang/operators/postdec_variationStr.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test N-- operator : various numbers as strings
                      3: --FILE--
                      4: <?php
                      5: 
                      6: $strVals = array(
                      7:    "0","65","-44", "1.2", "-7.7", "abc", "123abc", "123e5", "123e5xyz", " 123abc", "123 abc", "123abc ", "3.4a",
                      8:    "a5.9"
                      9: );
                     10: 
                     11: 
                     12: foreach ($strVals as $strVal) {
                     13:    echo "--- testing: '$strVal' ---\n";
                     14:    $strVal--;
                     15:    var_dump($strVal);
                     16: }
                     17:    
                     18: ?>
                     19: ===DONE===
                     20: --EXPECT--
                     21: --- testing: '0' ---
                     22: int(-1)
                     23: --- testing: '65' ---
                     24: int(64)
                     25: --- testing: '-44' ---
                     26: int(-45)
                     27: --- testing: '1.2' ---
                     28: float(0.2)
                     29: --- testing: '-7.7' ---
                     30: float(-8.7)
                     31: --- testing: 'abc' ---
                     32: string(3) "abc"
                     33: --- testing: '123abc' ---
                     34: string(6) "123abc"
                     35: --- testing: '123e5' ---
                     36: float(12299999)
                     37: --- testing: '123e5xyz' ---
                     38: string(8) "123e5xyz"
                     39: --- testing: ' 123abc' ---
                     40: string(7) " 123abc"
                     41: --- testing: '123 abc' ---
                     42: string(7) "123 abc"
                     43: --- testing: '123abc ' ---
                     44: string(7) "123abc "
                     45: --- testing: '3.4a' ---
                     46: string(4) "3.4a"
                     47: --- testing: 'a5.9' ---
                     48: string(4) "a5.9"
                     49: ===DONE===

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