Bug #53409 [Opn->Tbd]: sleep() return NULL

From: Date: Thu, 25 Nov 2010 22:57:52 +0000
Subject: Bug #53409 [Opn->Tbd]: sleep() return NULL
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-156464@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53409&edit=1

 ID:                 53409
 Updated by:         pajoye@php.net
 Reported by:        webmaster at skarmflyg dot org
 Summary:            sleep() return NULL
-Status:             Open
+Status:             To be documented
 Type:               Bug
 Package:            Unknown/Other Function
 Operating System:   Windows XP
 PHP Version:        5.3.3
 Block user comment: N
 Private report:     N

 New Comment:

Sleep on windows returns nothing as well as some other platforms.

The result of sleep is actually platform dependent (NULL/FALSE or
0/FALSE).


Previous Comments:
------------------------------------------------------------------------
[2010-11-25 22:45:15] webmaster at skarmflyg dot org

Description:
------------
---
From manual page: http://www.php.net/function.sleep#Return Values
---
Sleep should return int or possibly boolean false but returns NULL.

Using 
PHP 5.3.3 
Apache 2.2.6
Windows XP SP3

Test script:
---------------
$x=sleep(1);
var_dump($x);  // Outputs NULL. Expected int 0.

Expected result:
----------------
According to documentation $x should be integer 0 or possibly false.

Actual result:
--------------
Variable $x becomes NULL.


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53409&edit=1


Thread (4 messages)

« previous php.bugs (#156464) next »