diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/standard/tests/array/max_variation2.phpt | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/standard/tests/array/max_variation2.phpt')
-rw-r--r-- | ext/standard/tests/array/max_variation2.phpt | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/ext/standard/tests/array/max_variation2.phpt b/ext/standard/tests/array/max_variation2.phpt new file mode 100644 index 0000000..9abcda5 --- /dev/null +++ b/ext/standard/tests/array/max_variation2.phpt @@ -0,0 +1,55 @@ +--TEST-- +Test variations in usage of max() +--FILE-- +<?php +/* + * proto mixed max(mixed arg1 [, mixed arg2 [, mixed ...]]) + * Function is implemented in ext/standard/array.c +*/ + +echo "\n*** Testing arrays ***\n"; + +var_dump(max(array(2,1,2))); +var_dump(max(array(-2,1,2))); +var_dump(max(array(2.1,2.11,2.09))); +var_dump(max(array("", "t", "b"))); +var_dump(max(array(false, true, false))); +var_dump(max(array(true, false, true))); +var_dump(max(array(1, true, false, true))); +var_dump(max(array(0, true, false, true))); +var_dump(max(array(0, 1, array(2,3)))); +var_dump(max(array(2147483645, 2147483646))); +var_dump(max(array(2147483647, 2147483648))); +var_dump(max(array(2147483646, 2147483648))); +var_dump(max(array(-2147483647, -2147483646))); +var_dump(max(array(-2147483648, -2147483647))); +var_dump(max(array(-2147483649, -2147483647))); + +echo "\nDone\n"; + +?> +--EXPECTF-- + +*** Testing arrays *** +int(2) +int(2) +float(2.11) +string(1) "t" +bool(true) +bool(true) +int(1) +bool(true) +array(2) { + [0]=> + int(2) + [1]=> + int(3) +} +int(2147483646) +%s(2147483648) +%s(2147483648) +int(-2147483646) +int(-2147483647) +int(-2147483647) + +Done |