|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-09-11 12:34 UTC] kozak at eurosat dot cz
Description: ------------ At the moment isset call return true only when variable is set and it is not null. But there is no way (or I do not find it so far), how to just test variable for existance. So it will be perfect if there will be some other call (for eg: exist) or some parametr how to get this behaviour More in example. Test script: --------------- $a = null; $testOnlyExistence = true; echo isset($b); // prints false; echo isset($a); // prints false; echo isset($a, $testOnlyExistence); // prints true; echo isset($b, $testOnlyExistence); // prints false; // or echo exist($a); // prints true; echo exist($b); // prints false; PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 12:00:01 2025 UTC |
echo array_key_exists('b', get_defined_vars()) ? "exists" : "doesn't exist";