[thelist] is_null php

Paul Bennett paul at teltest.com
Tue Jul 29 19:13:23 CDT 2003


Tom Dell'Aringa wrote:

>--- Paul Bennett <paul at teltest.com> wrote:
>
>  
>
>>is_null only works in >php 4.0.4, what version are you running?
>>    
>>
>
>Not sure and I cannot find the scriptlet on how you check (isn't is a
>server variable?) anyway I'm pretty sure its the latest. 
>
you can use a script with this in it:

<?php
phpInfo();
?>
that will give you a *detailed* lost of all your php current server 
config, including php engine version
Be sure to delete it after you use it, as it can be a great way for 
h4x0rs to discover services and server vulnerabilities

>
>Regardless - is my code correct? If not what is the correct way to
>deal with that?
>
It looks correct to me. Another way to do it (this is how I check,as our 
server admin can't be bothered upgrading our php version) is:

if($var != NULL)
    {
    # do stuff
    }
which looks to be essentially the same thing, except not relying upon 
is_null()


-- 
 ------------------------------
	Paul Bennett						
	Internet Developer				
	Teltest Electronic Design		
 ------------------------------			
Email: paul at teltest.com				
Phone: 64 4 237 4557					
Web: http://www.teltest.com		
Wap: http://wap.teltest.com			




More information about the thelist mailing list