3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Intialize the input $score=rand(50,100); //Determine the Grade function p($a,$b) { echo $a . " >= " . $b; return $a>=$b; } $grade=(p($score,90))?'A':( p($score,80)?'B':( p($score,70)?'C':( p($score,60)?'D':'F'))); //Output the Results echo "<h1>A score of $score = $grade</h1>";

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.3.10.0090.00716.38
7.3.00.0060.00616.19
7.2.130.0100.00316.63
7.2.120.0070.00916.46
7.2.110.0070.00716.68
7.2.100.0090.01016.55
7.2.90.0090.00716.56
7.2.80.0110.00416.79
7.2.70.0130.00316.63
7.2.60.0050.01116.58
7.2.50.0050.00716.49
7.2.40.0090.00316.52
7.2.30.0070.00916.71
7.2.20.0110.00316.39
7.2.10.0100.00816.46
7.2.00.0050.01016.85
7.1.250.0040.00715.29
7.1.70.0000.00817.32
7.1.60.0120.01219.46
7.1.50.0110.01116.77
7.1.00.0030.07722.51
7.0.200.0000.01016.64
7.0.140.0030.07021.96
7.0.60.0070.03720.01
7.0.50.0030.06017.87
7.0.40.0030.04720.23
7.0.30.0230.06020.24
7.0.20.0330.07720.27
7.0.10.0130.03320.10
7.0.00.0070.05720.22
5.6.280.0070.07020.86
5.6.210.0030.07020.55
5.6.200.0100.08318.23
5.6.190.0030.05720.61
5.6.180.0400.05320.49
5.6.170.0230.06720.47
5.6.160.0030.05720.53
5.6.150.0100.08318.30
5.6.140.0070.07018.14
5.6.130.0100.07718.15
5.6.120.0100.07320.99
5.6.110.0170.07321.14
5.6.100.0130.06321.05
5.6.90.0130.07720.88
5.6.80.0100.03320.43
5.6.70.4400.03720.45
5.5.350.0170.07020.32
5.5.340.0130.06717.94
5.5.330.0070.04020.27
5.5.320.0400.06720.24
5.5.310.0230.04320.34
5.5.300.0130.07317.94
5.5.290.0130.07717.98
5.5.280.0100.05720.96
5.5.270.0000.05320.79
5.5.260.0170.06020.68
5.5.250.0070.08020.47
5.5.240.0070.07320.06
5.4.450.0270.05019.64
5.4.440.0330.05319.59
5.4.430.0530.04019.53
5.4.420.0170.04719.30
5.4.410.0470.03719.28
5.4.400.0400.03318.84
5.4.390.0400.03719.15
5.4.380.0300.05318.78
5.4.370.0430.04318.65
5.4.360.0330.05018.79
5.4.350.0270.06318.76
5.4.340.0370.05718.54
5.4.320.0090.03312.50
5.4.310.0090.03412.50
5.4.300.0040.03812.50
5.4.290.0100.03812.50
5.4.280.0020.03812.40
5.4.270.0010.04012.40
5.4.260.0060.03612.40
5.4.250.0040.03912.39
5.4.240.0050.03812.40
5.4.230.0060.03712.39
5.4.220.0070.03412.39
5.4.210.0070.03312.39
5.4.200.0070.03512.39
5.4.190.0090.03212.38
5.4.180.0040.03812.38
5.4.170.0060.03412.39
5.4.160.0060.03912.39
5.4.150.0090.03412.39
5.4.140.0070.03412.07
5.4.130.0050.03612.06
5.4.120.0090.03212.02
5.4.110.0020.03812.01
5.4.100.0050.03512.02
5.4.90.0060.03612.01
5.4.80.0040.03812.01
5.4.70.0040.03512.01
5.4.60.0070.03212.01
5.4.50.0070.03312.01
5.4.40.0050.04012.00
5.4.30.0040.03712.00
5.4.20.0080.03211.99
5.4.10.0060.03711.99
5.4.00.0050.03611.49
5.3.290.0070.03812.80
5.3.280.0070.03612.71
5.3.270.0050.03912.72
5.3.260.0060.04512.71
5.3.250.0050.03812.72
5.3.240.0050.04012.72
5.3.230.0070.03712.71
5.3.220.0060.03912.68
5.3.210.0070.03812.68
5.3.200.0080.03412.68
5.3.190.0040.04012.68
5.3.180.0100.03312.67
5.3.170.0070.03912.67
5.3.160.0090.03412.67
5.3.150.0030.04012.68
5.3.140.0060.03712.66
5.3.130.0040.04112.66
5.3.120.0080.04612.66
5.3.110.0090.04312.66
5.3.100.0090.03312.11
5.3.90.0040.03812.10
5.3.80.0070.03612.10
5.3.70.0070.03612.09
5.3.60.0060.03612.08
5.3.50.0050.03812.02
5.3.40.0040.03912.03
5.3.30.0060.03511.98
5.3.20.0110.03111.76
5.3.10.0050.03511.73
5.3.00.0050.03711.72
5.2.170.0060.0289.22
5.2.160.0050.0289.22
5.2.150.0040.0419.23
5.2.140.0060.0359.22
5.2.130.0070.0279.18
5.2.120.0020.0309.18
5.2.110.0070.0269.19
5.2.100.0040.0289.18
5.2.90.0070.0269.18
5.2.80.0040.0319.18
5.2.70.0070.0289.17
5.2.60.0040.0349.13
5.2.50.0030.0369.10
5.2.40.0020.0319.07
5.2.30.0070.0269.04
5.2.20.0050.0279.03
5.2.10.0060.0268.94
5.2.00.0050.0278.80
5.1.60.0040.0248.09
5.1.50.0040.0248.09
5.1.40.0040.0248.07
5.1.30.0030.0278.41
5.1.20.0040.0268.43
5.1.10.0020.0278.16
5.1.00.0020.0278.16
5.0.50.0020.0216.64
5.0.40.0030.0196.50
5.0.30.0010.0336.31
5.0.20.0040.0236.28
5.0.10.0030.0286.26
5.0.00.0030.0306.25
4.4.90.0040.0134.78
4.4.80.0020.0154.75
4.4.70.0030.0154.75
4.4.60.0020.0164.75
4.4.50.0010.0174.77
4.4.40.0020.0254.71
4.4.30.0050.0134.76
4.4.20.0030.0164.84
4.4.10.0030.0154.85
4.4.00.0010.0264.76
4.3.110.0030.0154.67
4.3.100.0030.0144.66
4.3.90.0020.0154.64
4.3.80.0030.0244.59
4.3.70.0020.0154.63
4.3.60.0030.0144.63
4.3.50.0030.0154.63
4.3.40.0030.0264.54
4.3.30.0010.0173.30
4.3.20.0030.0153.28
4.3.10.0010.0173.24
4.3.00.0030.01715.68

preferences:
30.8 ms | 401 KiB | 5 Q