3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isDivisible_x_3($n) { if (strlen($n) == 3){ list($a,$b,$c) = str_split($n); if ($b == $a + 1 && $c == $b + 1){ $mess = "\n$n is divisible by three\n"; $mess .= "\nProof: \$n//3 == {$n/3}"; return $mess; } } } $num = 234; echo isDivisible_x_3( $num );

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.30.0200.09020.23
7.0.20.0300.07320.23
7.0.10.0000.06020.10
7.0.00.0000.04320.25
5.6.180.0270.05020.68
5.6.170.0270.03720.40
5.6.160.0030.07720.61
5.6.150.0030.04018.29
5.6.140.0100.08018.16
5.6.130.0070.07718.23
5.6.120.0100.08321.00
5.6.110.0100.03721.00
5.6.100.0070.05721.01
5.6.90.0070.07721.10
5.6.80.0100.07720.38
5.5.320.0400.06320.27
5.5.310.0270.05020.36
5.5.300.0070.08018.02
5.5.290.0000.06017.95
5.5.280.0070.08320.88
5.5.270.0170.07720.97
5.5.260.0070.06720.68
5.5.250.0030.07020.55
5.5.240.0200.07320.16

preferences:
140.69 ms | 1394 KiB | 7 Q