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

 ID:                 53409
 Updated by:         paj...@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

Reply via email to