3v4l.org

run code in 300+ PHP versions simultaneously
<?php function work($i){ list($v, $u) = split(" ", $i); $u == 'C' || print( $v = $u == 'K' ? $v - 273.15 : ($v - 32)*5/9 ) . " C\n"; $u != "K" && print $v + 273.15 . " K\n"; $u != "F" && print $v * 9/5 + 32 . " F\n"; } function f($i){list($v,$u)=split(" ",$i);$u==C||print($v=$u==K?$v-273.15:($v-32)*5/9)."C\n";$u!=K&&print $v+273.15 ."K\n";$u!=F&&print $v*9/5+32 ."F\n";} @f("23 C"); echo "\n\n"; // Expect 73.4 F 296.15 K @f("86.987 F"); echo "\n\n"; // Expect 303.6983 K 30.5483 C @f("56.99999999 K"); echo "\n\n"; // Expect -216.1500 C -357.0700 F
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function split() in /in/CpvG7:10 Stack trace: #0 /in/CpvG7(12): f('23 C') #1 {main} thrown in /in/CpvG7 on line 10
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
61.11 ms | 405 KiB | 9 Q