Annotation of embedaddon/php/ext/standard/tests/math/octdec_basic_64bit.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test octdec() - basic function test octdec()
                      3: --SKIPIF--
                      4: <?php
                      5: if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only");
                      6: ?>
                      7: --FILE--
                      8: <?php
                      9: 
                     10: echo "*** Testing octdec() : basic functionality ***\n";
                     11: 
                     12: $values = array(01234567,
                     13:                                0567,
                     14:                                017777777777,
                     15:                                020000000000,
                     16:                                0x1234ABC,
                     17:                                12345,
                     18:                                '01234567',
                     19:                                '0567',
                     20:                                '017777777777',
                     21:                                '020000000000',
                     22:                                '0x1234ABC',
                     23:                                '12345',
                     24:                                31101.3,
                     25:                                31.1013e5,                              
                     26:                                true,
                     27:                                false,
                     28:                                null);  
                     29: 
                     30: for ($i = 0; $i < count($values); $i++) {
                     31:        $res = octdec($values[$i]);
                     32:        var_dump($res);
                     33: }
                     34: ?>
                     35: ===Done===
                     36: --EXPECTF--
                     37: *** Testing octdec() : basic functionality ***
                     38: int(14489)
                     39: int(253)
                     40: int(36947879)
                     41: int(4618484)
                     42: int(4104)
                     43: int(5349)
                     44: int(342391)
                     45: int(375)
                     46: int(2147483647)
                     47: int(2147483648)
                     48: int(668)
                     49: int(5349)
                     50: int(102923)
                     51: int(823384)
                     52: int(1)
                     53: int(0)
                     54: int(0)
                     55: ===Done===

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