diff options
| author | Zoe Slattery <zoe@php.net> | 2008-02-01 17:27:43 +0000 |
|---|---|---|
| committer | Zoe Slattery <zoe@php.net> | 2008-02-01 17:27:43 +0000 |
| commit | cc0b147a2f031f9eed0ef1ee08e61da820ceaa4e (patch) | |
| tree | 4e7c060ee45de2b87ae5e5e2fe85fe129ca93cfd /ext/standard/tests/math/bindec_basic.phpt | |
| parent | 801ce5ee0380065536c2c178eff5e5bfafb161f7 (diff) | |
| download | php-git-cc0b147a2f031f9eed0ef1ee08e61da820ceaa4e.tar.gz | |
A few new tests for math functions - Note the "constants" test will fail on Windows - Bug 42143.
Diffstat (limited to 'ext/standard/tests/math/bindec_basic.phpt')
| -rw-r--r-- | ext/standard/tests/math/bindec_basic.phpt | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/ext/standard/tests/math/bindec_basic.phpt b/ext/standard/tests/math/bindec_basic.phpt new file mode 100644 index 0000000000..fe9ab099f7 --- /dev/null +++ b/ext/standard/tests/math/bindec_basic.phpt @@ -0,0 +1,49 @@ +--TEST-- +Test bindec() - basic function test bindec() +--FILE-- +<?php +$values = array(111000111, + 011100000, + 1111111111111111111111111111111, + 10000000000000000000000000000000, + 100002001, + '111000111', + '011100000', + '1111111111111111111111111111111', + '10000000000000000000000000000000', + '100002001', + 'abcdefg', + 311015, + 31101.3, + 31.1013e5, + 0x111ABC, + 011237, + true, + false, + null); + +for ($i = 0; $i < count($values); $i++) { + $res = bindec($values[$i]); + var_dump($res); +} +?> +--EXPECTF-- +int(455) +int(0) +int(32766) +int(5) +int(129) +int(455) +int(224) +int(2147483647) +float(2147483648) +int(129) +int(0) +int(13) +int(13) +int(26) +int(6) +int(0) +int(1) +int(0) +int(0)
\ No newline at end of file |
