Created
February 3, 2017 05:40
-
-
Save shyazusa/93428f32a1cfc55574937a004bc1ebf3 to your computer and use it in GitHub Desktop.
PHPとJavaScriptの型チェックの方法まとめ
This file contains hidden or 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 | |
$integer = 1 ; | |
$string = '1'; | |
echo gettype($integer); // integer | |
echo gettype($string); // string |
This file contains hidden or 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
const number = 1 ; | |
const string = '1'; | |
console.log(typeof(number)); // number | |
console.log(typeof(string)); // string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment