3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $hasil = 52.5; $biasa = array(0,40,65); $puas = array(40,65,80); $istimewa = array(65,80,100); $kb = array_intersect($biasa, $puas); print_r($result); echo $result[1]; // 40 if ( $hasil <= $kb ) { // hitung nilai kecewa pake rumus fuzzy logic $muKecewa = $kb[1] - $hasil / $kb[2] - $kb[1]; //output : 52,5 $muBiasa = $hasil - $kb[1] / $kb[2] - $kb[1]; echo $muKecewa; echo $muBiasa; } else { echo "false"; }
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: result in /in/nP31c on line 7 Notice: Undefined variable: result in /in/nP31c on line 9 -0.8076923076923111.884615384615
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: result in /in/nP31c on line 7 Notice: Undefined variable: result in /in/nP31c on line 9 -0.8076923076923111.884615384615