3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $hasil = 65; $kecewa = array(0,40,65); $biasa = array(40,65,80); $puas = array(65,80,100); $kb = array_intersect($kecewa, $biasa); $bp = array_intersect($biasa, $puas); print_r($kb); print_r($bp); // antara 65 - 80 if ( $hasil >= $bp[1] && $hasil <= $bp[2] ) { $muPuas = ($hasil - $bp[1]) / ($bp[2]-$bp[1]); echo " muPuas" .$muPuas; } else { echo "False"; }
Output for 4.3.0 - 7.1.0
Array ( [1] => 40 [2] => 65 ) Array ( [1] => 65 [2] => 80 ) muPuas0