Annotation of embedaddon/php/ext/standard/tests/general_functions/getservbyname_variation9.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Test function getservbyname() by substituting argument 2 with boolean values.
1.1.1.2 ! misho 3: --SKIPIF--
! 4: <?php
! 5: if(PHP_OS == 'Darwin') {
! 6: die("skip.. Mac OS X is fine with NULLs in getservbyname");
! 7: }
! 8: ?>
1.1 misho 9: --FILE--
10: <?php
11:
12:
13: echo "*** Test substituting argument 2 with boolean values ***\n";
14:
15: $service = "www";
16:
17: $variation_array = array(
18: 'lowercase true' => true,
19: 'lowercase false' =>false,
20: 'uppercase TRUE' =>TRUE,
21: 'uppercase FALSE' =>FALSE,
22: );
23:
24:
25: foreach ( $variation_array as $var ) {
26: var_dump(getservbyname( $service, $var ) );
27: }
28: ?>
29: --EXPECTF--
30: *** Test substituting argument 2 with boolean values ***
31: bool(false)
32: bool(false)
33: bool(false)
34: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>