3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hasil = 0; $kurang = array(0,12); $cukup = array(12,16); $berlebih = array(16,20); $kb = array_intersect($kurang, $cukup); $bp = array_intersect($cukup, $berlebih); print_r($kc); print_r($cb); // antara 12-16 if ( $hasil >= $cb[1] && $hasil <= $cb[2] ) { $muCukup = ($hasil >= $cb[2]) ? "0" : ($hasil <= $cb[2] ? ($hasil - $kc[1]) / ($kc[2] - $kc[1]) : "0.5" ); $muBerlebih = ($hasil - $cb[1]) / ($cb[2] - $cb[1]); echo " muPuas " .$muBerlebih; echo " muBiasa " .$muCukup; } // antara 0-12 elseif ( $hasil >= $kc[1] && $hasil < $kc[2] ) { $muKurang = ($kc[2] - $hasil) / ($kc[2] - $kc[1]); $muCukup = ($hasil - $kc[1]) / ($kc[2] - $kc[1]); echo "muKecewa " .$muKurang; echo "muBias " .$muCukup; }
Output for git.master, git.master_jit
Warning: Undefined variable $kc in /in/Ak5ph on line 10 Warning: Undefined variable $cb in /in/Ak5ph on line 11 Warning: Undefined variable $cb in /in/Ak5ph on line 14 Warning: Trying to access array offset on value of type null in /in/Ak5ph on line 14 Warning: Undefined variable $cb in /in/Ak5ph on line 14 Warning: Trying to access array offset on value of type null in /in/Ak5ph on line 14 Warning: Undefined variable $cb in /in/Ak5ph on line 17 Warning: Trying to access array offset on value of type null in /in/Ak5ph on line 17 Warning: Undefined variable $cb in /in/Ak5ph on line 18 Warning: Trying to access array offset on value of type null in /in/Ak5ph on line 18 Warning: Undefined variable $cb in /in/Ak5ph on line 18 Warning: Trying to access array offset on value of type null in /in/Ak5ph on line 18 Warning: Undefined variable $cb in /in/Ak5ph on line 18 Warning: Trying to access array offset on value of type null in /in/Ak5ph on line 18 Fatal error: Uncaught DivisionByZeroError: Division by zero in /in/Ak5ph:18 Stack trace: #0 {main} thrown in /in/Ak5ph on line 18
Process exited with code 255.
Output for rfc.property-hooks
Warning: Undefined variable $kc in /in/Ak5ph on line 10 Warning: Undefined variable $cb in /in/Ak5ph on line 11 Warning: Undefined variable $cb in /in/Ak5ph on line 14 Warning: Trying to access array offset on null in /in/Ak5ph on line 14 Warning: Undefined variable $cb in /in/Ak5ph on line 14 Warning: Trying to access array offset on null in /in/Ak5ph on line 14 Warning: Undefined variable $cb in /in/Ak5ph on line 17 Warning: Trying to access array offset on null in /in/Ak5ph on line 17 Warning: Undefined variable $cb in /in/Ak5ph on line 18 Warning: Trying to access array offset on null in /in/Ak5ph on line 18 Warning: Undefined variable $cb in /in/Ak5ph on line 18 Warning: Trying to access array offset on null in /in/Ak5ph on line 18 Warning: Undefined variable $cb in /in/Ak5ph on line 18 Warning: Trying to access array offset on null in /in/Ak5ph on line 18 Fatal error: Uncaught DivisionByZeroError: Division by zero in /in/Ak5ph:18 Stack trace: #0 {main} thrown in /in/Ak5ph on line 18
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:
45.96 ms | 402 KiB | 8 Q