Interconversion Formulas Used
The input temperature argument is internally converted into its equivalent on the Kelvin (K) scale and then that value is, in turn, converted into its equivalent on all the other scales and the computed results displayed. Applying the mathematical definition, absolute zero means the absence of all heat, thus there cannot be any negative temperatures on either of the absolute (K or R) scales. The program will report temperatures that equate to below absolute zero as an error.

Jay Tanner  2017 
The Common Standard Temperature Scales: Fahrenheit and Celsius
The Absolute Temperature Scales: Kelvin and Rankine
The absolute temperature scales are reckoned upwards from the absolute zero point, where absolute zero refers to the theoretical temperature at which molecular energy is at a minimum or, theoretically, the lowest possible temperature in nature, the absence of all measureable heat. By definition, there are no negative absolute temperatures.
Notes On the Fahrenheit and Celsius Scales
On the Fahrenheit scale, the difference between boiling and freezing is: (212  32) = 180 F
On the Celsius scale, the difference between boiling and freezing is: (100  0) = 100 C
The ratio of the differences between the boiling and freezing points is: (212  32) / (100  0) = 180/100 = 18/10 = 9/5
Thus, the ratio of Fahrenheit to Celsius degrees is 9 to 5 . In other words, a difference of 9 degrees on the Fahrenheit scale equates to a difference of exactly 5 degrees on the Celsius scale. This is the source of those ratios, 9/5 and 5/9 , we encounter in the interconversion formulas.
In a linear context, one Celsius degree is 9/5 = 1.8 times longer than a Fahrenheit degree.
Based on the difference ratio defined above and 32 degrees being the freezing point of water on the Fahrenheit scale, the general F/C scale interconversion formulas may be given as: F = C_{ }×(9/5) + 32
and C = (F  32)×(5/9)
It is also very interesting to note that the Fahrenheit and Celsius scales are numerically equal at 40 degrees, which leads to the following alternative interconversion formulas between the F and C scales.
F = (C + 40)×(9/5)  40
and C = (F + 40)×(5/9)  40

Below is a source code listing of the PHP function around which the above program was built. /* ============================================================ Temperature scale interconversion function. Author : Jay Tanner  2014 Language : PHP v5.4.7 License : This source code is released under the provisions of the GNU Affero General Public License, v3. http://www.gnu.org/licenses/agpl.html ============================================================ This function converts any given temperature on the F,C,K or R scale into the equivalent temperature on any of the other scales. The scale symbols are: F = Fahrenheit C = Celsius K = Kelvin = Degrees Celsius above absolute zero. R = Rankine = Degrees Fahrenheit above absolute zero. The scale symbols are NOT case sensitive. The conversion is performed by first converting the input temperature value into its equivalent on the K scale, then the K scale value is converted into the given output scale.  EXAMPLE To convert 123.45 C into its equivalent on the R scale: print Temp_To_Temp("123.45 C", "R"); // Result = 269.46  ERRORS FALSE is returned if a scale symbol is not recognized or an asterisk (*) is returned if temperature < absolute zero. ============================================================ */ function Temp_To_Temp ($FromTempStr, $ToScaleStr) { // Read input argument value and scales. $w = trim($FromTempStr); if ($w == '') {$w = "0";} $T = floatval($w); $FromScale = substr($w, 1); $ToScale = trim($ToScaleStr); // Convert T input ($FromScale) into K scale equivalent. switch (strtoupper(trim($FromScale))) { case "F" : $K = (5 * ($T  32) / 9) + 273.15; break; case "C" : $K = $T + 273.15; break; case "K" : $K = $T; break; case "R" : $K = (5 * ($T  491.67) / 9) + 273.15; break; default : $K = FALSE; break; } // ERROR if invalid FromScale. if ($K === FALSE) {return $K;} // Return an asterisk (*) if temperature < absolute zero. if ($K < 0) {return '*';} // Convert K value into output ($ToScale) equivalent T. switch (strtoupper(trim($ToScale))) { case "F" : $T = (9 * ($K  273.15) / 5) + 32; break; case "C" : $T = $K  273.15; break; case "K" : $T = $K; break; case "R" : $T = (9 * ($K  273.15) / 5) + 491.67; break; default : $T = FALSE; break; } return $T; } // End of Temp_To_Temp(...) Jay Tanner  2017
