Skip to content

Instantly share code, notes, and snippets.

@2no
Created December 6, 2011 07:10
Show Gist options
  • Save 2no/1437151 to your computer and use it in GitHub Desktop.
Save 2no/1437151 to your computer and use it in GitHub Desktop.
摂氏<->華氏 変換
<?php
$c = 5.0 * ($deg - 32.0) / 9.0; // 摂氏
$f = 9.0 / (5.0 * $deg) + 32.0; // 華氏
printf('%.1f', $c);
printf('%.1f', $f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment