Annotation of embedaddon/php/ext/standard/tests/network/fsockopen_variation1.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: testing fsockopen without a protocol string
                      3: --FILE--
                      4: <?php
                      5: 
                      6: echo "Open a server socket\n";
                      7: $server = stream_socket_server('tcp://127.0.0.1:31337');
                      8: 
                      9: echo "\nCalling fsockopen() without a protocol in the hostname string:\n";
                     10: $hostname = '127.0.0.1';
                     11: $port = '31337';
                     12: $client = fsockopen($hostname, $port);
                     13: var_dump($client);
                     14: fclose($client);
                     15: 
                     16: echo "\nCalling fsockopen() with address and port in same string, without a protocol:\n";
                     17: $address = $hostname . ':' . $port;
                     18: $second_client = fsockopen($address);
                     19: var_dump($second_client);
                     20: fclose($second_client);
                     21: 
                     22: echo "Done";
                     23: ?>
                     24: --EXPECTF--
                     25: Open a server socket
                     26: 
                     27: Calling fsockopen() without a protocol in the hostname string:
                     28: resource(%d) of type (stream)
                     29: 
                     30: Calling fsockopen() with address and port in same string, without a protocol:
                     31: resource(%d) of type (stream)
                     32: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>