PHP 8.5.0 Alpha 4 available for testing

Voting

: min(two, eight)?
(Example: nine)

The Note You're Voting On

ceo at l-i-e dot com
19 years ago
If you need fopen() on a URL to timeout, you can do like:
<?php
$timeout
= 3;
$old = ini_set('default_socket_timeout', $timeout);
$file = fopen('http://example.com', 'r');
ini_set('default_socket_timeout', $old);
stream_set_timeout($file, $timeout);
stream_set_blocking($file, 0);
//the rest is standard
?>

<< Back to user notes page

To Top