3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $num=3; for ($i = 2; $i <= $num-1; $i++) { if ($num % $i == 0) { $value= True; } } if ($value) { echo 'The Number '. $num . ' Is A Composite'; } else { echo 'The Number '. $num . ' Is A Prime'; }
Output for 5.0.4 - 7.2.0
Notice: Undefined variable: value in /in/gjdkG on line 10 The Number 3 Is A Prime
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: value in /in/gjdkG on line 10 The Number 3 Is A Prime