1--TEST-- 2socket_export_stream: Bad arguments 3--SKIPIF-- 4<?php 5if (!extension_loaded('sockets')) { 6 die('SKIP sockets extension not available.'); 7} 8--FILE-- 9<?php 10 11var_dump(socket_export_stream()); 12var_dump(socket_export_stream(1, 2)); 13var_dump(socket_export_stream(1)); 14var_dump(socket_export_stream(new stdclass)); 15var_dump(socket_export_stream(fopen(__FILE__, "rb"))); 16var_dump(socket_export_stream(stream_socket_server("udp://127.0.0.1:0", $errno, $errstr, STREAM_SERVER_BIND))); 17$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); 18var_dump($s); 19socket_close($s); 20var_dump(socket_export_stream($s)); 21 22 23echo "Done."; 24--EXPECTF-- 25Warning: socket_export_stream() expects exactly 1 parameter, 0 given in %s on line %d 26NULL 27 28Warning: socket_export_stream() expects exactly 1 parameter, 2 given in %s on line %d 29NULL 30 31Warning: socket_export_stream() expects parameter 1 to be resource, int given in %s on line %d 32NULL 33 34Warning: socket_export_stream() expects parameter 1 to be resource, object given in %s on line %d 35NULL 36 37Warning: socket_export_stream(): supplied resource is not a valid Socket resource in %s on line %d 38bool(false) 39 40Warning: socket_export_stream(): supplied resource is not a valid Socket resource in %s on line %d 41bool(false) 42resource(%d) of type (Socket) 43 44Warning: socket_export_stream(): supplied resource is not a valid Socket resource in %s on line %d 45bool(false) 46Done. 47