1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00
Files
Arnaud Le Blanc 0036a09ebe 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:04:28 +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);
?>