3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sks = 7; $kurang = array(0,8.5,14); $cukup = array(8.5,14,19.5); $lebih = array(14,19.5,24); $kc = array_intersect($kurang, $cukup); $cl = array_intersect($cukup, $lebih); print_r($kc); print_r($cl); // cl if ( $sks >= $cl[1] && $sks <= $cl[2] ) { $ftCukup = ($sks >= $cl[2]) ? "0" : ($sks <= $cl[2] ? ($sks - $kc[1]) / ($kc[2] - $kc[1]) : "0.5" ); $ftLebih = ($sks - $cl[1]) / ($cl[2] - $cl[1]); echo " ftLebih " .$ftLebih; echo " ftCukup " .$ftCukup; if ($ftLebih > $ftCukup) { echo "</br> . Beban Berlebih"; } else { echo "</br> . Beban Cukup"; } } // kc elseif ( $sks >= $kc[1] && $sks < $kc[2] ) { $ftKurang = ($kc[2] - $sks) / ($kc[2] - $kc[1]); $ftCukup = ($sks - $kc[1]) / ($kc[2] - $kc[1]); echo "ftKurang " .$ftKurang; echo "ftCukup " .$ftCukup; if ($ftKurang > $ftCukup) { echo "Beban Kurang"; } else { echo "Beban Cukup"; } } else { echo "Total SKS yang Diinputkan tidak bisa diproses Sistem "; }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [1] => 8.5 [2] => 14 ) Array ( [1] => 14 [2] => 19.5 ) Total SKS yang Diinputkan tidak bisa diproses Sistem

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:
32 ms | 401 KiB | 8 Q