--TEST--
Test parameter handling in socket_create_pair()
--SKIPIF--
<?php
if (substr(PHP_OS03) != 'WIN') {
    die(
'skip.. Not valid for non Windows');
}
if (!
extension_loaded('sockets')) {
    die(
'SKIP The sockets extension is not loaded.');
}
--
FILE--
<?
php
var_dump
(socket_create_pair(AF_INETnullnull));

$domain 'unknown';
var_dump(socket_create_pair($domainSOCK_STREAM0$sockets));

var_dump(socket_create_pair(AF_INETnullnull$sockets));

var_dump(socket_create_pair(31337nullnull$sockets));

var_dump(socket_create_pair(AF_INET313370$sockets));
--
EXPECTF--
Warningsocket_create_pair() expects exactly 4 parameters3 given in %s on line %d
NULL

Warning
socket_create_pair() expects parameter 1 to be long, %unicode_string_optionalgiven in %s on line %d
NULL
bool
(true)

Warningsocket_create_pair(): invalid socket domain [31337specified for argument 1assuming AF_INET in %s on line %d
bool
(true)

Warningsocket_create_pair(): invalid socket type [31337specified for argument 2assuming SOCK_STREAM in %s on line %d
bool
(true)
--
CREDITS--
Till Klampaeckeltill@php.net
Berlin TestFest 2009