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_basic.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_basic.phpt')
-rw-r--r-- | ext/standard/tests/array/max_basic.phpt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ext/standard/tests/array/max_basic.phpt b/ext/standard/tests/array/max_basic.phpt new file mode 100644 index 0000000..f304212 --- /dev/null +++ b/ext/standard/tests/array/max_basic.phpt @@ -0,0 +1,42 @@ +--TEST-- +Test return type and value for expected input max() +--FILE-- +<?php +/* + * proto mixed max(mixed arg1 [, mixed arg2 [, mixed ...]]) + * Function is implemented in ext/standard/array.c +*/ + +echo "\n*** Testing sequences of numbers ***\n"; + +var_dump(max(2,1,2)); +var_dump(max(-2,1,2)); +var_dump(max(2.1,2.11,2.09)); +var_dump(max("", "t", "b")); +var_dump(max(false, true, false)); +var_dump(max(true, false, true)); +var_dump(max(1, true, false, true)); +var_dump(max(0, true, false, true)); +var_dump(max(0, 1, array(2,3))); + +echo "\nDone\n"; +?> +--EXPECT-- + +*** Testing sequences of numbers *** +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) +} + +Done |