Annotation of embedaddon/php/ext/standard/tests/general_functions/getservbyname_variation10.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test function getservbyname() by substituting argument 2 with emptyUnsetUndefNull values.
! 3: --FILE--
! 4: <?php
! 5:
! 6:
! 7: echo "*** Test substituting argument 2 with emptyUnsetUndefNull values ***\n";
! 8:
! 9: $service = "www";
! 10:
! 11:
! 12: $unset_var = 10;
! 13: unset($unset_var);
! 14:
! 15: $variation_array = array(
! 16: 'unset var' => @$unset_var,
! 17: 'undefined var' => @$undefined_var,
! 18: 'empty string DQ' => "",
! 19: 'empty string SQ' => '',
! 20: 'uppercase NULL' => NULL,
! 21: 'lowercase null' => null,
! 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 emptyUnsetUndefNull values ***
! 31: bool(false)
! 32: bool(false)
! 33: bool(false)
! 34: bool(false)
! 35: bool(false)
! 36: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>