3v4l.org

run code in 300+ PHP versions simultaneously
<?php $maxMatches = 3; $matches = array('tails' => 0, 'heads' => 0, 'total' => 0); while(max($matches['tails'], $matches['heads']) < $maxMatches) { $faceType = rand(0, 1); if ($faceType) { $matches['heads']++; $matches['tails'] = 0; echo $faceType . " is heads\n"; } else { $matches['tails']++; $matches['heads'] = 0; echo $faceType." is tails\n"; } $matches['total']++; } echo "total flips took is: " . $matches['total'];

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.2.00.0060.00619.66
7.1.70.0030.00717.19
7.1.60.0060.01819.12
7.1.50.0030.01617.06
7.1.00.0070.07322.40
7.0.200.0070.00716.73
7.0.140.0000.07022.09
7.0.60.0070.05019.95
7.0.50.0230.06317.80
7.0.40.0100.08320.38
7.0.30.0270.04320.20
7.0.20.0270.05720.33
7.0.10.0300.03720.18
7.0.00.0000.04720.00
5.6.280.0130.06321.02
5.6.210.0070.08020.47
5.6.200.0030.08018.17
5.6.190.0070.08320.43
5.6.180.0230.08020.57
5.6.170.0330.07720.46
5.6.160.0030.05320.45
5.6.150.0030.04018.08
5.6.140.0000.04718.21
5.6.130.0100.08318.09
5.6.120.0100.07720.95
5.6.110.0170.08321.11
5.6.100.0100.08321.04
5.6.90.0200.06721.10
5.6.80.0000.08320.50
5.5.350.0030.08320.52
5.5.340.0070.05017.94
5.5.330.0130.07720.36
5.5.320.0230.05020.17
5.5.310.0400.04020.50
5.5.300.0070.08317.91
5.5.290.0100.04718.02
5.5.280.0030.04720.85
5.5.270.0070.08720.88
5.5.260.0070.08320.71
5.5.250.0200.07020.54
5.5.240.0030.04720.15
5.4.450.0570.04019.45
5.4.440.0330.03719.45
5.4.430.0300.04019.45
5.4.420.0500.04319.45
5.4.410.0230.03719.45
5.4.400.0200.04019.45
5.4.390.0130.04319.45
5.4.380.0300.06018.53
5.4.370.0330.05018.70
5.4.360.0470.04718.68
5.4.350.0430.07718.72
5.4.340.0230.05718.59
5.4.320.0110.03712.45
5.4.310.0070.03712.45
5.4.300.0080.03412.46
5.4.290.0080.03512.45
5.4.280.0050.03612.35
5.4.270.0090.03412.35
5.4.260.0070.03912.35
5.4.250.0090.03612.35
5.4.240.0050.04512.35
5.4.230.0050.04412.34
5.4.220.0050.03612.34
5.4.210.0030.03612.34
5.4.200.0050.03812.34
5.4.190.0120.02912.34
5.4.180.0050.03812.34
5.4.170.0060.04012.35
5.4.160.0050.03512.35
5.4.150.0080.03712.34
5.4.140.0070.04012.02
5.4.130.0090.03212.01
5.4.120.0050.03811.97
5.4.110.0040.04311.97
5.4.100.0080.03811.96
5.4.90.0080.03911.97
5.4.80.0060.04611.97
5.4.70.0080.03911.96
5.4.60.0050.03611.96
5.4.50.0060.04111.96
5.4.40.0090.03611.95
5.4.30.0060.03411.95
5.4.20.0030.03711.95
5.4.10.0030.03611.95
5.4.00.0050.03511.44
5.3.290.0060.03812.80
5.3.280.0080.03512.71
5.3.270.0060.03912.72
5.3.260.0030.04012.72
5.3.250.0060.03512.72
5.3.240.0060.04212.72
5.3.230.0080.03812.71
5.3.220.0040.03812.68
5.3.210.0050.04712.68
5.3.200.0050.03512.68
5.3.190.0080.03512.68
5.3.180.0080.04012.67
5.3.170.0030.03812.67
5.3.160.0090.03312.67
5.3.150.0070.03612.67
5.3.140.0040.03812.66
5.3.130.0090.03612.66
5.3.120.0090.04212.66
5.3.110.0060.04112.65
5.3.100.0050.03612.12
5.3.90.0070.04512.09
5.3.80.0070.03512.07
5.3.70.0070.03512.07
5.3.60.0040.03912.06
5.3.50.0060.03612.00
5.3.40.0030.03812.00
5.3.30.0080.03011.95
5.3.20.0040.03711.73
5.3.10.0050.03411.70
5.3.00.0050.03911.68
5.2.170.0040.0459.18
5.2.160.0080.0309.18
5.2.150.0060.0289.18
5.2.140.0020.0399.18
5.2.130.0020.0349.14
5.2.120.0050.0349.14
5.2.110.0050.0299.14
5.2.100.0060.0299.14
5.2.90.0060.0299.14
5.2.80.0030.0379.14
5.2.70.0030.0319.13
5.2.60.0020.0429.09
5.2.50.0050.0339.06
5.2.40.0060.0279.04
5.2.30.0080.0359.01
5.2.20.0050.0289.00
5.2.10.0050.0268.93
5.2.00.0050.0278.79
5.1.60.0020.0278.08
5.1.50.0030.0318.07
5.1.40.0060.0218.06
5.1.30.0020.0278.41
5.1.20.0040.0268.43
5.1.10.0060.0248.16
5.1.00.0030.0268.15
5.0.50.0030.0216.63
5.0.40.0050.0176.49
5.0.30.0030.0306.30
5.0.20.0070.0286.27
5.0.10.0040.0196.25
5.0.00.0040.0296.24
4.4.90.0030.0154.78
4.4.80.0030.0154.76
4.4.70.0010.0184.76
4.4.60.0030.0154.75
4.4.50.0020.0164.77
4.4.40.0040.0284.71
4.4.30.0020.0204.76
4.4.20.0020.0184.84
4.4.10.0030.0154.85
4.4.00.0050.0224.76
4.3.110.0020.0164.66
4.3.100.0050.0124.66
4.3.90.0030.0144.64
4.3.80.0030.0314.58
4.3.70.0020.0154.63
4.3.60.0030.0184.63
4.3.50.0020.0164.63
4.3.40.0050.0254.54
4.3.30.0010.0213.30
4.3.20.0010.0173.27
4.3.10.0030.0143.23
4.3.00.0000.01719.45

preferences:
36.09 ms | 400 KiB | 5 Q