|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-07-26 13:16 UTC] hholzgra@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 10 10:00:02 2026 UTC |
Suppose there is a function which takes one argument. If an unset variable is passed to the function it is reported as not being set, but it is reported as being a string. For example: function foo($var) { if(isset($var)) { echo "Argument is set."; } if(is_string($var)) { echo "Argument is a string."; } } foo($nonExistentVar); This will output: Argument is a string. Thus, PHP considers $nonExistentVar to be both unset *and* a string at the same time.