Annotation of embedaddon/php/ext/standard/tests/general_functions/getservbyname_variation3.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Test function getservbyname() by substituting argument 1 with emptyUnsetUndefNull values.
! 3: --FILE--
! 4: <?php
! 5:
! 6:
! 7: echo "*** Test substituting argument 1 with emptyUnsetUndefNull values ***\n";
! 8:
! 9: $protocol = "tcp";
! 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( $var , $protocol ) );
! 27: }
! 28: ?>
! 29: --EXPECTF--
! 30: *** Test substituting argument 1 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>