ちょっとした実験。
<?php function test($a = 'test') { print "a = {$a} \n"; } test(); test('bbb'); test(''); test(null); test(false);
結果
php t.php a = test a = bbb a = a = a =
php t.php
a = test
a = bbb
a =
まぁ概ね予想通りっちゃぁ予想通り。よかったよかった、嫌な予感のほうが当たらなくて(笑
備忘録ってことで、memoり。
Permalink | コメント(1) | トラックバック(0)
gallu
エンジニアでゲーマーなおいちゃん