php-src/sapi/cli/tests/022.inc
Arnaud Le Blanc 9b0d76d585 Open STDIN and php://stdin streams with the relevant
wrapper when the file descriptor is a socket (inetd, etc)
Fixes bug #43731
2008-11-04 21:05:31 +00:00

15 lines
189 B
PHP

<?php
ob_start();
var_dump(STDIN);
$fd = fopen("php://stdin","r");
var_dump($fd);
$client_socket = stream_socket_accept($fd);
$data = ob_get_clean();
fwrite($client_socket, $data);
?>