3v4l.org

run code in 300+ PHP versions simultaneously
<?php $grades = array( "PK", "K", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" ); function normalizeLexileScore($ability, $grade_level = null, $cast = false) { if( $grade_level == null ) { return $ability; } if ($cast) { $grade_level = (int)$grade_level; } $grade_level = max(min($grade_level, 9), 2); $gli_cap = array(NULL, NULL, 975, 1070, 1165, 1250, 1300, 1370, 1420, 1500); $normalized = min($ability, $gli_cap[$grade_level]); return $normalized; } foreach ($grades as $grade) { $minBad = normalizeLexileScore(0, $grade, false); $maxBad = normalizeLexileScore(2000, $grade, false); $minGood = normalizeLexileScore(0, $grade, true); $maxGood = normalizeLexileScore(2000, $grade, true); printf("Grade %2s: Bad: %d < %d, Good: %d < %d\n", $grade, $minBad, $maxBad, $minGood, $maxGood); }

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)
8.3.60.0090.00618.43
8.3.50.0140.00521.04
8.3.40.0060.01218.89
8.3.30.0040.01119.09
8.3.20.0000.00720.35
8.3.10.0050.00320.52
8.3.00.0040.00419.38
8.2.180.0180.00417.00
8.2.170.0150.00622.96
8.2.160.0070.00720.39
8.2.150.0030.00524.18
8.2.140.0030.00624.66
8.2.130.0030.00526.16
8.2.120.0070.00022.21
8.2.110.0030.00621.18
8.2.100.0060.00617.89
8.2.90.0050.00319.38
8.2.80.0040.00417.97
8.2.70.0000.00917.63
8.2.60.0040.00418.05
8.2.50.0060.00318.10
8.2.40.0030.00520.59
8.2.30.0060.00319.24
8.2.20.0040.00417.76
8.2.10.0040.00418.24
8.2.00.0100.00017.71
8.1.280.0220.00425.92
8.1.270.0090.00022.06
8.1.260.0070.00026.35
8.1.250.0060.00328.09
8.1.240.0030.00622.80
8.1.230.0040.00817.71
8.1.220.0000.00817.78
8.1.210.0040.00718.77
8.1.200.0040.00417.22
8.1.190.0030.00517.10
8.1.180.0060.00318.10
8.1.170.0060.00318.56
8.1.160.0070.00022.20
8.1.150.0040.00418.85
8.1.140.0060.00317.48
8.1.130.0080.00017.84
8.1.120.0000.00717.49
8.1.110.0030.00617.37
8.1.100.0000.00717.53
8.1.90.0040.00417.41
8.1.80.0070.00017.37
8.1.70.0000.00717.42
8.1.60.0030.00617.64
8.1.50.0000.00817.59
8.1.40.0030.00517.57
8.1.30.0060.00317.62
8.1.20.0040.00417.50
8.1.10.0020.00517.54
8.1.00.0000.00817.42
8.0.300.0060.00318.77
8.0.290.0040.00416.63
8.0.280.0030.00318.36
8.0.270.0000.00717.29
8.0.260.0000.00617.28
8.0.250.0000.00717.00
8.0.240.0030.00317.06
8.0.230.0000.00716.94
8.0.220.0030.00316.82
8.0.210.0070.00017.02
8.0.200.0000.00617.02
8.0.190.0080.00016.90
8.0.180.0050.00317.05
8.0.170.0000.00817.03
8.0.160.0030.00316.94
8.0.150.0030.00416.95
8.0.140.0040.00416.91
8.0.130.0030.00313.40
8.0.120.0000.00816.94
8.0.110.0040.00416.99
8.0.100.0090.00016.80
8.0.90.0040.00416.83
8.0.80.0060.00916.96
8.0.70.0030.00516.77
8.0.60.0050.00316.89
8.0.50.0040.00417.04
8.0.30.0090.00817.25
8.0.20.0130.00717.40
8.0.10.0080.00016.99
8.0.00.0070.01116.76
7.4.330.0050.00015.13
7.4.320.0050.00216.48
7.4.300.0030.00316.51
7.4.290.0030.00316.67
7.4.280.0050.00316.47
7.4.270.0040.00416.65
7.4.260.0000.00716.55
7.4.250.0040.00416.44
7.4.240.0020.00616.57
7.4.230.0030.00316.63
7.4.220.0120.01216.65
7.4.210.0070.01416.59
7.4.200.0040.00416.73
7.4.160.0080.00816.46
7.4.150.0130.00617.40
7.4.140.0040.01417.86
7.4.130.0130.00616.52
7.4.120.0120.00416.63
7.4.110.0230.01016.49
7.4.100.0060.01216.43
7.4.90.0090.00916.69
7.4.80.0170.00019.37
7.4.70.0100.01016.49
7.4.60.0060.01016.54
7.4.50.0040.00416.67
7.4.40.0060.00916.33
7.4.30.0060.01316.69
7.4.10.0000.01915.14
7.4.00.0080.00814.93
7.3.330.0030.00413.41
7.3.320.0030.00213.39
7.3.310.0070.00016.25
7.3.300.0040.00416.36
7.3.290.0060.01316.40
7.3.280.0070.01016.38
7.3.270.0110.00917.40
7.3.260.0110.00816.37
7.3.250.0140.00516.38
7.3.240.0070.01016.43
7.3.230.0040.01416.39
7.3.210.0150.00616.38
7.3.200.0100.00719.39
7.3.190.0030.01416.73
7.3.180.0100.00616.55
7.3.170.0070.01016.52
7.3.160.0120.00316.58
7.3.130.0030.01414.68
7.3.120.0000.01714.55
7.3.110.0030.01314.93
7.3.100.0030.01414.83
7.3.90.0040.01114.73
7.3.80.0030.01014.94
7.3.70.0060.00614.64
7.3.60.0030.01014.52
7.3.50.0070.00714.61
7.3.40.0000.00914.63
7.3.30.0060.01014.54
7.3.20.0080.00816.59
7.3.10.0080.00616.34
7.3.00.0120.00416.41
7.2.330.0030.01416.51
7.2.320.0090.00916.50
7.2.310.0170.00616.79
7.2.300.0110.00716.47
7.2.290.0150.00616.73
7.2.260.0100.01015.10
7.2.250.0150.00315.08
7.2.240.0070.01015.17
7.2.230.0080.00414.77
7.2.220.0100.00615.23
7.2.210.0070.00715.03
7.2.200.0060.00315.12
7.2.190.0100.00714.83
7.2.180.0100.01015.23
7.2.170.0030.00815.05
7.2.160.0040.01115.22
7.2.150.0090.00316.82
7.2.140.0040.01517.07
7.2.130.0080.00816.72
7.2.120.0090.00816.76
7.2.110.0070.00916.79
7.2.100.0060.00816.74
7.2.90.0080.00816.91
7.2.80.0070.00916.79
7.2.70.0060.00916.85
7.2.60.0100.00616.81
7.2.50.0120.00516.74
7.2.40.0100.00316.88
7.2.30.0090.00616.79
7.2.20.0070.00816.80
7.2.10.0060.00716.83
7.2.00.0050.00817.39
7.1.330.0070.01015.66
7.1.320.0040.00715.97
7.1.310.0110.00415.48
7.1.300.0060.00915.87
7.1.290.0080.01115.84
7.1.280.0050.00515.61
7.1.270.0040.00415.89
7.1.260.0070.00415.75
7.1.250.0090.00915.65
7.1.240.0080.00515.67
7.1.230.0090.00515.67
7.1.220.0070.00615.67
7.1.210.0090.00415.70
7.1.200.0080.01015.84
7.1.190.0050.00915.64
7.1.180.0030.01316.01
7.1.170.0080.00615.87
7.1.160.0070.00615.85
7.1.150.0090.00515.65
7.1.140.0030.00915.85
7.1.130.0040.01015.66
7.1.120.0050.00915.67
7.1.110.0070.00915.63
7.1.100.0040.01016.48
7.1.90.0080.00615.56
7.1.80.0020.01315.67
7.1.70.0060.00616.28
7.1.60.0100.00517.02
7.1.50.0080.00816.02
7.1.40.0030.01015.75
7.1.30.0050.00815.73
7.1.20.0040.00815.81
7.1.10.0080.00615.50
7.1.00.0080.02917.85
7.0.330.0060.00815.40
7.0.320.0090.00415.32
7.0.310.0090.00915.27
7.0.300.0050.00815.13
7.0.290.0030.00815.26
7.0.280.0070.01115.51
7.0.270.0090.00615.20
7.0.260.0080.00215.35
7.0.250.0090.00915.27
7.0.240.0070.00815.27
7.0.230.0100.00415.38
7.0.220.0080.00215.37
7.0.210.0080.00615.38
7.0.200.0050.00915.81
7.0.190.0060.01115.46
7.0.180.0050.00715.32
7.0.170.0070.00715.28
7.0.160.0070.00715.25
7.0.150.0030.01115.17
7.0.140.0070.02817.47
7.0.130.0110.00315.52
7.0.120.0110.00515.32
7.0.110.0090.00515.49
7.0.100.0040.00915.34
7.0.90.0100.00815.36
7.0.80.0050.00915.30
7.0.70.0070.00515.37
7.0.60.0100.02916.93
7.0.50.0070.02216.22
7.0.40.0070.02615.67
7.0.30.0130.02115.67
7.0.20.0110.03215.66
7.0.10.0060.02115.58
7.0.00.0070.03415.69
5.6.400.0000.00914.20
5.6.390.0060.00614.16
5.6.380.0020.01014.41
5.6.370.0050.00714.60
5.6.360.0090.00614.64
5.6.350.0060.00614.59
5.6.340.0020.01014.24
5.6.330.0050.00714.39
5.6.320.0070.00714.43
5.6.310.0040.00714.55
5.6.300.0060.00814.34
5.6.290.0020.01114.46
5.6.280.0040.02916.54
5.6.270.0050.00914.27
5.6.260.0110.00214.51
5.6.250.0030.01014.26
5.6.240.0110.00414.27
5.6.230.0030.01014.25
5.6.220.0040.01014.25
5.6.210.0090.03016.39
5.6.200.0010.03915.67
5.6.190.0060.03016.43
5.6.180.0210.02916.28
5.6.170.0120.02316.47
5.6.160.0080.02116.50
5.6.150.0130.02815.70
5.6.140.0070.03215.70
5.6.130.0070.02815.63
5.6.120.0050.03316.51
5.6.110.0050.03416.62
5.6.100.0050.02716.48
5.6.90.0100.02516.45
5.6.80.0100.01616.30
5.6.70.0000.01514.26
5.6.60.0060.00714.49
5.6.50.0030.01414.41
5.6.40.0070.00814.32
5.6.30.0100.00314.34
5.6.20.0030.01114.21
5.6.10.0090.00514.24
5.6.00.0120.00314.35
5.5.380.0080.00312.68
5.5.370.0080.00512.84
5.5.360.0070.00712.93
5.5.350.0090.02615.38
5.5.340.0060.02314.50
5.5.330.0060.02315.39
5.5.320.0170.02715.19
5.5.310.0140.01515.34
5.5.300.0020.03714.41
5.5.290.0040.03214.46
5.5.280.0070.01615.43
5.5.270.0060.03115.37
5.5.260.0050.02215.42
5.5.250.0070.02515.48
5.5.240.0130.01815.11
5.5.230.0070.00712.56
5.5.220.0080.00612.43
5.5.210.0040.01212.57
5.5.200.0020.00912.78
5.5.190.0080.00312.88
5.5.180.0060.00512.72
5.5.170.0070.00612.42
5.5.160.0080.00512.66
5.5.150.0040.00712.63
5.5.140.0070.00812.58
5.5.130.0030.00712.70
5.5.120.0040.00812.75
5.5.110.0050.00912.71
5.5.100.0080.00512.74
5.5.90.0080.00612.68
5.5.80.0060.00712.61
5.5.70.0030.00912.62
5.5.60.0040.00812.33
5.5.50.0040.01112.53
5.5.40.0070.00812.71
5.5.30.0050.00912.68
5.5.20.0050.00712.56
5.5.10.0070.00412.76
5.5.00.0080.00312.85
5.4.450.0110.01714.61
5.4.440.0320.02114.61
5.4.430.0070.02314.71
5.4.420.0230.00514.60
5.4.410.0260.00514.59
5.4.400.0200.00514.54
5.4.390.0240.00514.46
5.4.380.0260.00314.50
5.4.370.0220.00514.52
5.4.360.0210.00814.54
5.4.350.0270.00314.52
5.4.340.0220.00414.46
5.4.330.0020.01012.14
5.4.320.0060.01812.27
5.4.310.0040.01612.25
5.4.300.0040.01712.30
5.4.290.0060.01712.26
5.4.280.0040.01612.26
5.4.270.0020.02012.14
5.4.260.0060.01712.22
5.4.250.0040.01812.25
5.4.240.0060.02312.07
5.4.230.0070.01512.18
5.4.220.0050.01712.15
5.4.210.0050.02012.23
5.4.200.0030.02212.20
5.4.190.0070.01712.24
5.4.180.0040.01812.20
5.4.170.0050.01612.22
5.4.160.0070.01512.18
5.4.150.0020.02012.20
5.4.140.0050.01512.14
5.4.130.0030.01612.12
5.4.120.0060.01412.12
5.4.110.0050.01612.12
5.4.100.0050.01612.14
5.4.90.0040.01712.15
5.4.80.0050.01712.04
5.4.70.0040.01612.07
5.4.60.0030.01612.09
5.4.50.0060.01512.08
5.4.40.0060.01512.12
5.4.30.0030.01612.01
5.4.20.0040.01711.99
5.4.10.0030.01812.03
5.4.00.0050.01711.88
5.3.290.0060.02211.74
5.3.280.0030.02411.69
5.3.270.0070.02111.52
5.3.260.0050.02211.67
5.3.250.0090.01811.72
5.3.240.0050.02311.61
5.3.230.0050.02111.60
5.3.220.0080.01811.62
5.3.210.0040.02211.64
5.3.200.0080.02611.46
5.3.190.0040.02311.53
5.3.180.0070.02711.72
5.3.170.0040.02311.62
5.3.160.0050.02311.62
5.3.150.0060.02211.72
5.3.140.0100.01811.54
5.3.130.0050.02211.60
5.3.120.0040.02511.48
5.3.110.0060.02211.65
5.3.100.0050.02211.26
5.3.90.0050.02111.39
5.3.80.0050.02311.17
5.3.70.0070.01911.29
5.3.60.0070.02011.37
5.3.50.0050.02211.32
5.3.40.0070.02111.32
5.3.30.0070.02111.19
5.3.20.0080.01911.16
5.3.10.0090.02110.96
5.3.00.0070.02311.04
5.2.170.0050.0189.45
5.2.160.0040.0199.31
5.2.150.0040.0199.44
5.2.140.0060.0209.37
5.2.130.0070.0199.29
5.2.120.0080.0229.35
5.2.110.0070.0159.31
5.2.100.0040.0199.34
5.2.90.0070.0169.34
5.2.80.0050.0199.36
5.2.70.0080.0179.32
5.2.60.0070.0189.26
5.2.50.0090.0159.25
5.2.40.0040.0209.31
5.2.30.0040.0249.28
5.2.20.0060.0199.22
5.2.10.0060.0169.17
5.2.00.0060.0179.11
5.1.60.0020.0168.75
5.1.50.0030.0178.74
5.1.40.0050.0148.74
5.1.30.0070.0138.91
5.1.20.0030.0178.92
5.1.10.0070.0138.78
5.1.00.0030.0168.78
5.0.50.0020.0148.03
5.0.40.0060.0097.96
5.0.30.0030.0177.86
5.0.20.0040.0107.85
5.0.10.0040.0117.84
5.0.00.0020.0197.83
4.4.90.0050.0117.09
4.4.80.0060.0117.08
4.4.70.0030.0147.08
4.4.60.0070.0107.08
4.4.50.0040.0137.08
4.4.40.0010.0177.05
4.4.30.0030.0097.08
4.4.20.0030.0137.12
4.4.10.0010.0157.12
4.4.00.0030.0157.08
4.3.110.0010.0117.03
4.3.100.0030.0077.03
4.3.90.0010.0117.02
4.3.80.0030.0136.99
4.3.70.0030.0107.01
4.3.60.0040.0117.01
4.3.50.0030.0127.01
4.3.40.0040.0126.97
4.3.30.0050.0096.36
4.3.20.0020.0096.35
4.3.10.0010.0116.33
4.3.00.0020.0118.72

preferences:
44 ms | 400 KiB | 5 Q