Skip to content

Instantly share code, notes, and snippets.

@shyazusa
Created February 3, 2017 05:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shyazusa/93428f32a1cfc55574937a004bc1ebf3 to your computer and use it in GitHub Desktop.
Save shyazusa/93428f32a1cfc55574937a004bc1ebf3 to your computer and use it in GitHub Desktop.
PHPとJavaScriptの型チェックの方法まとめ
<?php
$integer = 1 ;
$string = '1';
echo gettype($integer); // integer
echo gettype($string); // string
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