3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Primes</title> </head> <body> <p id="line">Prime numbers less than 100: </p> </body> </html> <?php /** * Created by PhpStorm. * User: lilit * Date: 7/9/17 * Time: 8:44 PM */ function checkPrime() { for ($i = 2; $i < 100; $i++) { $primeTrue = true; for ($j = 2; $j <= sqrt($i); $j++) { if ($i % $j === 0) { $primeTrue = false; } } if ($primeTrue) { echo $i.' '; } } } checkPrime(); ?>
Output for git.master, git.master_jit, rfc.property-hooks
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Primes</title> </head> <body> <p id="line">Prime numbers less than 100: </p> </body> </html> 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97

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:
63.46 ms | 402 KiB | 8 Q