Created
December 4, 2013 09:54
-
-
Save PallCreaker/7785033 to your computer and use it in GitHub Desktop.
ハマったので、メモ。 return ( (ture) || (false) ) なら エラーが出そうだけど出ない。 これは tureになる。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function foo(){ | |
$a = array("test"=>array("a","b")); | |
return( | |
empty($a['test']) || !in_array("c", $a["test"]) //=>ture | |
// empty($a['test']) //=>false | |
// !in_array("c", $a["test"]) //=>ture | |
); | |
} | |
echo $hoge = foo() ? "ture":"false"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment