Tandem Posted September 26, 2006 Share Posted September 26, 2006 if i set a variable to false like this:[code]$blah = false;[/code]Does that effectively 'empty' the variable? Or does it literraly make it "false"? Or something else? Link to comment https://forums.phpfreaks.com/topic/22161-false/ Share on other sites More sharing options...
livepjam Posted September 26, 2006 Share Posted September 26, 2006 I believe it would truly make it a boolean, i.e. false. Link to comment https://forums.phpfreaks.com/topic/22161-false/#findComment-99224 Share on other sites More sharing options...
newb Posted September 26, 2006 Share Posted September 26, 2006 whats a boolean Link to comment https://forums.phpfreaks.com/topic/22161-false/#findComment-99225 Share on other sites More sharing options...
tleisher Posted September 26, 2006 Share Posted September 26, 2006 A boolean is a true/false test, it always returns True or false, nothing more. Link to comment https://forums.phpfreaks.com/topic/22161-false/#findComment-99226 Share on other sites More sharing options...
livepjam Posted September 26, 2006 Share Posted September 26, 2006 Eh, I'm not sure now...I tried the following code and it output the text:[code]<?php$blah = false;if (empty($blah))echo "It is empty";?>[/code]I guess that would mean the variable is empty. Link to comment https://forums.phpfreaks.com/topic/22161-false/#findComment-99227 Share on other sites More sharing options...
Tandem Posted September 26, 2006 Author Share Posted September 26, 2006 I just tried:[code]$blah = false;echo "$blah";[/code]and got no output, so yeah i guess it must be empty. Link to comment https://forums.phpfreaks.com/topic/22161-false/#findComment-99229 Share on other sites More sharing options...
livepjam Posted September 26, 2006 Share Posted September 26, 2006 It is empty, but it still holds the value false.[code]<?php$blah = false;if ($blah == false)echo "It is empty";?>[/code]If you do that, it outputs the echo. Link to comment https://forums.phpfreaks.com/topic/22161-false/#findComment-99231 Share on other sites More sharing options...
Tandem Posted September 26, 2006 Author Share Posted September 26, 2006 Ok cool, thanks for the replies. Link to comment https://forums.phpfreaks.com/topic/22161-false/#findComment-99233 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.