LoginSignup
2
3

More than 5 years have passed since last update.

PHPの嫌なところ

Last updated at Posted at 2012-12-26

以下のような関数があっても、警告すらされないのはちょっと….
今日はこれではまった。

test.php
<?php
function hoge($a){
        if($a) return true;
}
echo gettype(hoge(true)).chr(10);
echo gettype(hoge(false)).chr(10); 
?>
output
boolean
NULL
2
3
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3