Doc #76135 [Nab]: Issue with Isset

From: Date: Thu, 22 Mar 2018 05:21:34 +0000
Subject: Doc #76135 [Nab]: Issue with Isset
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15559@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76135&edit=1 ID: 76135 User updated by: faith dot morante at gmail dot com Reported by: faith dot morante at gmail dot com Summary: Issue with Isset Status: Not a bug Type: Documentation Problem Package: Documentation problem PHP Version: 7.1.15 Block user comment: N Private report: N New Comment: I see, thanks! But how come the empty function works with non-variables? Previous Comments: ------------------------------------------------------------------------ [2018-03-22 05:17:07] requinix@php.net Don't use isset on the result of an expression. If you're trying to say that the documentation does not mention this, it does: > Warning: isset() only works with variables as passing anything else will result in a parse > error. ------------------------------------------------------------------------ [2018-03-22 05:11:32] faith dot morante at gmail dot com Description: ------------ --- From manual page: http://www.php.net/function.isset --- Getting this error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) on line number 3 When explicitly passing a data in isset. Passing a variable with the same data works,though. Test script: --------------- var_dump(isset(null)); Expected result: ---------------- false Actual result: -------------- Cannot use isset() on the result of an expression (you can use "null !== expression" instead) on line number 3 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76135&edit=1

« previous php.doc.bugs (#15559) next »