Skip to content

Instantly share code, notes, and snippets.

@r35krag0th
Created May 4, 2015 19:15
Show Gist options
  • Save r35krag0th/1ffc43e93b71f137409e to your computer and use it in GitHub Desktop.
Save r35krag0th/1ffc43e93b71f137409e to your computer and use it in GitHub Desktop.
Oh PHP
<?php
$a = md5('240610708');
$b = md5('QNKCDZO');
echo "A\n";
var_dump($a);
echo "\nB\n";
var_dump($b);
echo "\nEquality of A == B\n";
var_dump($a == $b);
echo "\nEquality of A === B\n";
var_dump($a === $b);
echo "\nEquality inline\n";
var_dump(md5('240610708') == md5('QNKCDZO'));
echo "\nEquality inline (Triplet)\n";
var_dump(md5('240610708') === md5('QNKCDZO'));
?>
A
string(32) "0e462097431906509019562988736854"
B
string(32) "0e830400451993494058024219903391"
Equality of A == B
bool(true)
Equality of A === B
bool(false)
Equality inline
bool(true)
Equality inline (Triplet)
bool(false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment