3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 1 => array( 'message_id' => 1, 'points' => 3, ), 2 => array( 'message_id' => 2, 'points' => 2, ), 3 => array( 'message_id' => 3, 'points' => 2, ), ); $hieghest = 0; foreach ($array as $key => $arr) { if($arr['message_id'] > $hieghest) $hieghest = $arr['message_id']; } echo "Hieghest: " . $hieghest;

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.5.00.0160.00619.71
8.4.150.0020.00014.05
8.4.140.0140.00717.61
8.4.130.0080.01217.58
8.4.120.0090.00420.71
8.4.110.0120.00822.39
8.4.100.0110.00917.93
8.4.90.0140.00718.73
8.4.80.0140.00619.48
8.4.70.0060.00418.01
8.4.60.0100.00818.82
8.4.50.0100.01017.87
8.4.40.0130.00719.27
8.4.30.0130.01017.76
8.4.20.0120.00918.45
8.4.10.0060.01317.78
8.3.280.0080.01218.29
8.3.270.0120.00716.64
8.3.260.0110.00816.56
8.3.250.0110.00718.98
8.3.240.0070.00316.64
8.3.230.0160.00416.53
8.3.220.0100.00917.10
8.3.210.0050.00316.63
8.3.200.0120.00616.67
8.3.190.0120.00618.96
8.3.180.0080.01116.72
8.3.170.0180.00017.21
8.3.160.0150.00318.36
8.3.150.0090.00919.00
8.3.140.0000.01416.45
8.3.130.0000.00918.28
8.3.120.0030.00619.09
8.3.110.0120.00320.94
8.3.100.0000.00824.06
8.3.90.0040.00426.77
8.3.80.0090.00017.97
8.3.70.0120.00318.31
8.3.60.0100.00718.55
8.3.50.0090.01322.05
8.3.40.0110.00418.70
8.3.30.0040.01118.67
8.3.20.0180.00019.19
8.3.10.0080.00021.68
8.3.00.0000.00819.80
8.2.290.0120.00720.36
8.2.280.0080.00118.53
8.2.270.0160.00416.86
8.2.260.0040.00418.94
8.2.250.0040.00417.32
8.2.240.0030.00619.07
8.2.230.0040.00422.58
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0090.00016.25
8.2.190.0090.01316.58
8.2.180.0140.00718.18
8.2.170.0140.00722.96
8.2.160.0110.00322.20
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0040.00419.66
8.2.110.0080.00020.36
8.2.100.0110.00019.51
8.2.90.0040.00417.88
8.2.80.0040.00418.91
8.2.70.0040.00417.75
8.2.60.0030.00619.48
8.2.50.0000.00817.74
8.2.40.0040.00417.63
8.2.30.0030.00519.38
8.2.20.0040.00418.19
8.2.10.0000.00818.23
8.2.00.0040.00417.73
8.1.330.0100.00922.07
8.1.320.0120.00816.03
8.1.310.0040.00416.77
8.1.300.0040.00417.80
8.1.290.0060.00330.84
8.1.280.0150.00425.92
8.1.270.0070.00023.87
8.1.260.0050.00326.35
8.1.250.0060.00328.09
8.1.240.0090.00018.91
8.1.230.0090.00317.60
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00617.23
8.1.190.0040.00417.23
8.1.180.0060.00318.10
8.1.170.0060.00318.55
8.1.160.0070.00019.03
8.1.150.0000.00818.89
8.1.140.0040.00419.66
8.1.130.0000.00719.23
8.1.120.0000.00817.43
8.1.110.0000.00717.47
8.1.100.0000.00717.40
8.1.90.0080.00017.35
8.1.80.0080.00017.45
8.1.70.0030.00717.34
8.1.60.0040.00417.63
8.1.50.0030.00617.54
8.1.40.0040.00417.57
8.1.30.0000.00817.64
8.1.20.0060.00317.66
8.1.10.0030.00517.59
8.1.00.0080.00017.39
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00818.36
8.0.270.0000.00717.22
8.0.260.0050.00316.69
8.0.250.0030.00316.97
8.0.240.0000.00716.85
8.0.230.0040.00416.93
8.0.220.0000.00716.80
8.0.210.0000.00716.84
8.0.200.0040.00416.95
8.0.190.0030.00516.87
8.0.180.0050.00216.80
8.0.170.0040.00416.82
8.0.160.0070.00016.91
8.0.150.0000.00716.87
8.0.140.0000.01016.88
8.0.130.0030.00313.21
8.0.120.0070.00016.88
8.0.110.0000.00816.91
8.0.100.0000.00716.95
8.0.90.0070.00016.81
8.0.80.0100.00716.94
8.0.70.0030.00516.72
8.0.60.0030.00516.79
8.0.50.0040.00416.70
8.0.30.0090.01017.01
8.0.20.0060.01317.40
8.0.10.0070.00016.89
8.0.00.0030.01316.73
7.4.330.0030.00315.55
7.4.320.0040.00416.55
7.4.300.0030.00316.49
7.4.290.0040.00416.51
7.4.280.0000.00816.50
7.4.270.0000.00716.36
7.4.260.0000.00816.63
7.4.250.0000.00816.48
7.4.240.0030.00316.49
7.4.230.0000.00716.67
7.4.220.0100.00616.66
7.4.210.0030.01116.70
7.4.200.0030.00616.58
7.4.160.0060.01016.55
7.4.150.0060.01517.40
7.4.140.0100.00717.86
7.4.130.0100.00716.47
7.4.120.0170.00716.48
7.4.110.0070.01016.47
7.4.100.0100.00716.50
7.4.90.0080.00816.63
7.4.80.0000.01619.39
7.4.70.0030.01316.46
7.4.60.0070.01016.52
7.4.50.0030.00716.37
7.4.40.0130.00616.67
7.4.30.0060.00216.54
7.4.00.0100.00614.95
7.3.330.0030.00313.25
7.3.320.0050.00013.12
7.3.310.0040.00416.31
7.3.300.0000.00716.30
7.3.290.0060.01016.25
7.3.280.0070.01016.26
7.3.270.0080.01617.40
7.3.260.0150.00316.49
7.3.250.0140.00516.38
7.3.240.0080.00916.59
7.3.230.0130.00316.45
7.3.210.0030.01416.35
7.3.200.0040.01216.29
7.3.190.0120.00916.31
7.3.180.0060.01616.41
7.3.170.0040.01316.58
7.3.160.0110.01116.56
7.3.120.0090.01014.93
7.3.110.0080.01014.60
7.3.100.0050.00514.76
7.3.90.0020.01114.92
7.3.80.0030.01014.77
7.3.70.0070.01014.76
7.3.60.0020.01014.79
7.3.50.0050.01014.88
7.3.40.0110.00614.70
7.3.30.0080.00514.61
7.3.20.0070.00816.64
7.3.10.0040.00916.66
7.3.00.0070.01016.55
7.2.330.0160.00316.49
7.2.320.0090.01416.54
7.2.310.0130.00316.60
7.2.300.0070.01716.57
7.2.290.0200.00316.55
7.2.250.0030.01214.87
7.2.240.0090.00915.01
7.2.230.0100.00514.86
7.2.220.0050.01014.74
7.2.210.0100.00815.18
7.2.200.0060.00814.91
7.2.190.0060.00714.95
7.2.180.0080.00915.19
7.2.170.0040.01015.11
7.1.330.0040.01115.79
7.1.320.0020.00815.75
7.1.310.0040.01015.84
7.1.300.0050.01115.52
7.1.290.0090.00815.79
7.1.280.0050.00915.59
7.1.270.0050.01015.68
7.1.260.0040.00615.80
7.1.200.0070.00715.89
7.1.70.0000.00916.86
7.1.60.0000.01317.07
7.1.00.2030.06020.71
7.0.200.0060.00615.08
7.0.140.2630.05720.28
7.0.130.2000.06320.12
7.0.120.2070.05320.26
7.0.110.1930.06320.35
7.0.100.1770.06020.30
7.0.90.1870.05720.25
7.0.80.1770.05020.27
7.0.70.2170.05020.24
7.0.60.1670.05320.12
7.0.50.1530.05720.31
7.0.40.1530.05020.34
7.0.30.1670.05720.34
7.0.20.1670.05720.28
7.0.10.1700.06320.33
7.0.00.1800.05720.18
5.6.290.0100.06020.84
5.6.280.0200.04721.11
5.6.270.0230.04721.02
5.6.260.0070.06320.86
5.6.250.0070.06320.86
5.6.240.0100.06020.77
5.6.230.0170.05020.73
5.6.220.0170.05321.13
5.6.210.0200.05021.00
5.6.200.0200.05321.05
5.6.190.0070.06320.95
5.6.180.0200.05021.07
5.6.170.0100.06021.08
5.6.160.0130.05320.98
5.6.150.0170.05320.74
5.6.140.0130.05720.99
5.6.130.0070.07721.07
5.6.120.0100.07720.86
5.6.110.0200.06320.98
5.6.100.0100.06320.99
5.6.90.0170.07320.85
5.6.80.0070.06020.41
5.6.70.0000.08320.23
5.6.60.0170.05320.24
5.6.50.0070.06020.11
5.6.40.0170.05020.43
5.6.30.0200.06320.14
5.6.20.0130.06320.38
5.6.10.0100.05720.39
5.6.00.0070.06020.32

preferences:
164.08 ms | 403 KiB | 5 Q