3v4l.org

run code in 300+ PHP versions simultaneously
<? // alle Formeln nach http://www.wettermail.de/wetter/feuchte.html $temperatur = 5; $relfeuchte = 85; //Taupunktberechnung in °C function Taupunkt($temperatur,$relfeuchte) { $val = (234.67*0.434292289*log(6.1*exp((7.45*$temperatur) /(234.67+$temperatur)*2.3025851)*$relfeuchte/100/6.1)) /(7.45-0.434292289*log(6.1*exp((7.45*$temperatur) /(234.67+$temperatur)*2.3025851)*$relfeuchte/100/6.1) ); return $val; } //Sättigungsdampfdruck in hPa function SaettigungsDampfDruck($temperatur) { if ($temperatur >= 0) { $a = 7.5; $b = 237.3; } elseif ($temperatur < 0) { $a = 7.6; $b = 240.7; } $val = (6.1078 * exp( log(10) * (($a * $temperatur) / ($b + $temperatur)) ) ); return $val; } //Dampfdruck in hPa function DampfDruck($temperatur,$relfeuchte) { $val = $relfeuchte/100 * SaettigungsDampfDruck($temperatur); return $val; } //absolute Feuchte in g/m³ function AbsoluteFeuchte($temperatur,$relfeuchte) { $tk = ($temperatur + 273.15); $val = (exp(log(10) * 5) * 18.016/8314.3 * DampfDruck($temperatur,$relfeuchte)/$tk); return $val; } $taupunkt = Taupunkt($temperatur,$relfeuchte); $sattdampfdruck = SaettigungsDampfDruck($temperatur); $dampfdruck = DampfDruck($temperatur,$relfeuchte); $absfeuchte = AbsoluteFeuchte($temperatur,$relfeuchte); echo $absfeuchte; ?>
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.32, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
<? // alle Formeln nach http://www.wettermail.de/wetter/feuchte.html $temperatur = 5; $relfeuchte = 85; //Taupunktberechnung in °C function Taupunkt($temperatur,$relfeuchte) { $val = (234.67*0.434292289*log(6.1*exp((7.45*$temperatur) /(234.67+$temperatur)*2.3025851)*$relfeuchte/100/6.1)) /(7.45-0.434292289*log(6.1*exp((7.45*$temperatur) /(234.67+$temperatur)*2.3025851)*$relfeuchte/100/6.1) ); return $val; } //Sättigungsdampfdruck in hPa function SaettigungsDampfDruck($temperatur) { if ($temperatur >= 0) { $a = 7.5; $b = 237.3; } elseif ($temperatur < 0) { $a = 7.6; $b = 240.7; } $val = (6.1078 * exp( log(10) * (($a * $temperatur) / ($b + $temperatur)) ) ); return $val; } //Dampfdruck in hPa function DampfDruck($temperatur,$relfeuchte) { $val = $relfeuchte/100 * SaettigungsDampfDruck($temperatur); return $val; } //absolute Feuchte in g/m³ function AbsoluteFeuchte($temperatur,$relfeuchte) { $tk = ($temperatur + 273.15); $val = (exp(log(10) * 5) * 18.016/8314.3 * DampfDruck($temperatur,$relfeuchte)/$tk); return $val; } $taupunkt = Taupunkt($temperatur,$relfeuchte); $sattdampfdruck = SaettigungsDampfDruck($temperatur); $dampfdruck = DampfDruck($temperatur,$relfeuchte); $absfeuchte = AbsoluteFeuchte($temperatur,$relfeuchte); echo $absfeuchte; ?>
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 <? // alle Formeln nach http://www.wettermail.de/wetter/feuchte.html $temperatur = 5; $relfeuchte = 85; //Taupunktberechnung in °C function Taupunkt($temperatur,$relfeuchte) { $val = (234.67*0.434292289*log(6.1*exp((7.45*$temperatur) /(234.67+$temperatur)*2.3025851)*$relfeuchte/100/6.1)) /(7.45-0.434292289*log(6.1*exp((7.45*$temperatur) /(234.67+$temperatur)*2.3025851)*$relfeuchte/100/6.1) ); return $val; } //Sättigungsdampfdruck in hPa function SaettigungsDampfDruck($temperatur) { if ($temperatur >= 0) { $a = 7.5; $b = 237.3; } elseif ($temperatur < 0) { $a = 7.6; $b = 240.7; } $val = (6.1078 * exp( log(10) * (($a * $temperatur) / ($b + $temperatur)) ) ); return $val; } //Dampfdruck in hPa function DampfDruck($temperatur,$relfeuchte) { $val = $relfeuchte/100 * SaettigungsDampfDruck($temperatur); return $val; } //absolute Feuchte in g/m³ function AbsoluteFeuchte($temperatur,$relfeuchte) { $tk = ($temperatur + 273.15); $val = (exp(log(10) * 5) * 18.016/8314.3 * DampfDruck($temperatur,$relfeuchte)/$tk); return $val; } $taupunkt = Taupunkt($temperatur,$relfeuchte); $sattdampfdruck = SaettigungsDampfDruck($temperatur); $dampfdruck = DampfDruck($temperatur,$relfeuchte); $absfeuchte = AbsoluteFeuchte($temperatur,$relfeuchte); echo $absfeuchte; ?>
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.13, 7.3.0 - 7.3.1, 7.3.32 - 7.3.33, 7.4.33, 8.0.13
5.7759598992406

preferences:
171.6 ms | 403 KiB | 240 Q