LoginSignup
0
0

More than 1 year has passed since last update.

【PHP】int型指定の引数にstringを渡すとintになる

Last updated at Posted at 2022-09-29

実行例

function test(int $num) {
    var_dump($num);
}

test('99');
// int(99)  実行結果

string型の99をint型指定の関数に通すとint型の99に変換されます。

参考

0
0
0

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
0
0