Can someone explain this please...

From: Date: Thu, 15 Aug 2002 23:18:34 +0000
Subject: Can someone explain this please...
Groups: php.general 
Request: Send a blank email to php-general+get-112876@lists.php.net to get a copy of this message
Hello! I am doing this $newpath = "./uploads/newdir/"; if (!is_dir($newpath)) mkdir($newpath, 0666); $decperms = fileperms($newpath); $octalperms = sprintf("%o",$decperms); $perms=(substr($octalperms,2)); echo $perms; if ($perms != 777) { rmdir ($newpath); } This will not delete the dir created with $newpath. It will only work if i change this if ($perms != 777) into this if ($perms != '777' ) // Please note the single quotes around 777 Could someone tell me why it behaves like this? Cause if for example i do this $foo = 1; if ($foo == 1) //will evaluate as true, so why not with the above? Thanks a lot in advance for your time and help! Best regards from Vienna, Jürgen

« previous php.general (#112876) next »