Jump to content

Confusion level 9000


Recommended Posts

Posted (edited)

$hi = null;
if($hi =!null) { // $hi = !null always returns true, $hi != null checks against nulls (or false/""/etc)
    $hi = null; // Set $hi to "null"
}
if ($hi = null) { // $hi = null always returns true, $hi == null checks for nulls (or false/""/etc)
    $hi = !null; // Set $hi to "true"
}

The rest is dead code, and welcome to Type Juggling!

Edit: Sorry, I lied, tricky syntax tongue.png Fixed now

Edited by dudeami

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...