Bug #75730 [Opn->Fbk]: Stuck on is_null()
| From: | daverandom@php.net | Date: | Mon, 25 Dec 2017 21:18:26 +0000 |
| Subject: | Bug #75730 [Opn->Fbk]: Stuck on is_null() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-213267@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75730&edit=1
ID: 75730
Updated by: daverandom@php.net
Reported by: momchil at bojinov dot info
Summary: Stuck on is_null()
-Status: Open
+Status: Feedback
Type: Bug
Package: Scripting Engine problem
Operating System: Windows 10
PHP Version: 7.1.12
Block user comment: N
Private report: N
New Comment:
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
The two lines you show are not functionally identical.
is_null($Ticks) returns true only when $Ticks is null (it is equivalent to the $Ticks === null
strict comparison), whereas $Ticks == null will return true when $Ticks is null, false, int(0), an
empty string or an empty arrsy. Please debug your code, as the problem does not lie in PHP.
For more information, please check the type comparison tables here:
http://php.net/manual/en/types.comparisons.php#types.comparisions-loose
Previous Comments:
------------------------------------------------------------------------
[2017-12-25 20:46:45] momchil at bojinov dot info
forgot to mention
faulting line:
pDraw.php:770
------------------------------------------------------------------------
[2017-12-25 20:45:32] momchil at bojinov dot info
Description:
------------
Hello,
I m refactoring some old code and I hit a roadblock
if (is_null($Ticks)) { - That one gets PHP.EXE stuck consuming lots of CPU
#if ($Ticks == NULL) { - That one runs fine
I have packaged the entire solution:
bojinov.info/momchil/php/bug.zip
It contains PHP 7.1.12 x64 TS with all the needed scripts
to execute run php examples\example.basic.php
Test script:
---------------
php examples\example.basic.php
Expected result:
----------------
nothing
Actual result:
--------------
PHP hangs
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75730&edit=1