|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-03-11 21:09 UTC] jani@php.net
-Operating System: Windows XP Professional SP3
+Operating System: win32 only
[2013-10-24 08:11 UTC] yohgaki@php.net
-Status: Open
+Status: Feedback
[2013-10-24 08:11 UTC] yohgaki@php.net
[2014-12-30 10:41 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 19:00:01 2025 UTC |
Description: ------------ I've experienced this problem for years but have never bothered to report it until now. I write a lot of command-line PHP scripts and I've found that scripts that do not attempt to open a socket connection terminate immediately at the end of the program. However, scripts that contact remote (or even 'localhost') servers (i.e. open a socket during script execution) hang for about 5 seconds before returning control to the command prompt. I only experience this issue on Windows machines. Linux and OSX boxes seem unaffected. Test script: --------------- <?php file_get_contents("http://www.google.com/"); echo "Hi!\n"; ?> Expected result: ---------------- Return to the command prompt as soon as the "Hi!" is output. Actual result: -------------- Reaches the end of the script (after displaying "Hi!") and simply hangs for 5 seconds or so.