3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $n = 5645645737373788558585857823452352352346234523567858578377; if ($n == 1) { echo 'Not a Prime or Composite No.'; } $set = 0; for ($index = 2; $index <= $n/2; $index++) { if ($n % $index === 0) { $set = 1; break; } } if ($set) { echo 'Composite'; } else { echo 'Prime'; }
based on JLtaU
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Composite