3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hasil = 52.5; $kecewa = array(0,40,65); $biasa = array(40,65,80); $puas = array(65,80,100); $kb = array_intersect($kecewa, $biasa); print_r($kb); if ( $hasil <= $kb ) { // hitung nilai kecewa pake rumus fuzzy logic $muKecewa = ($kb[2] - $hasil) / ($kb[2] - $kb[1]); //output : 52,5 $muBiasa = ($muKecewa >= 1) ? '0' : '0.5'; // output: bool(true) $muPuas = ($muBiasa <= 1) ? '0.5' : '0'; echo $muKecewa; echo "<br />"; echo $muBiasa; echo "<br />"; echo $muPuas; } else { echo "false"; }
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [1] => 40 [2] => 65 ) 0.5<br />0.5<br />0.5

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