Skip to content

Instantly share code, notes, and snippets.

@ScreamingDev
Last active December 23, 2015 13:39
Show Gist options
  • Select an option

  • Save ScreamingDev/6644108 to your computer and use it in GitHub Desktop.

Select an option

Save ScreamingDev/6644108 to your computer and use it in GitHub Desktop.
The day I wanted to test against associative array ...
<?php
// php -r "var_dump(intval('foo'), intval('foo') == 'foo', 0 == 'foo', (bool) 'foo', 0 == true);"
var_dump(
intval('foo'), // 0
0 == 'foo', // true
'foo' == 0, // true
true == 'foo', // true
'foo' == true, // true
// so when 0 == foo and foo == true then ...
0 == true // false
);
echo "meh!";
@klein0r

klein0r commented Sep 21, 2013

Copy link
Copy Markdown

:D Sehr cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment