3v4l.org

run code in 300+ PHP versions simultaneously
<html> <?php $time = microtime(); // Create an array and push on the names // of your closest family and friends $family = array("mother", "father", "gmother", "gfather"); // Sort the list sort($family); rsort($family); // Randomly select a winner! $winner = ""; $win = rand(0,3); switch($win){ case 0: $winner = $family[0]; break; case 1: $winner = $family[1]; break; case 2: $winner = $family[2]; break; case 3: $winner = $family[3]; break; default: echo "Переможець не визначений!"; } // Print the winner's name in ALL CAPS echo strtoupper("І так, у нас є переможеце і це ......".$winner."\n"); echo microtime() - $time; exit; ?> </html>

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.120.0110.00814.97
7.3.110.0070.01115.05
7.3.100.0120.00315.06
7.3.90.0030.00714.85
7.3.80.0040.00814.85
7.3.70.0130.00014.97
7.3.60.0060.00614.68
7.3.50.0030.00714.75
7.3.40.0030.00614.89
7.3.30.0090.00314.82
7.3.20.0070.00716.70
7.3.10.0110.00116.51
7.3.00.0030.01016.56
7.2.240.0090.00914.98
7.2.230.0000.01615.16
7.2.220.0040.00815.37
7.2.210.0000.01315.01
7.2.200.0090.00615.05
7.2.190.0030.01015.14
7.2.180.0060.00614.89
7.2.170.0060.00915.05
7.2.160.0080.00314.99
7.2.150.0030.01016.86
7.2.140.0000.01516.60
7.2.130.0080.00717.13
7.2.120.0140.00316.89
7.2.110.0040.01116.78
7.2.100.0070.00916.96
7.2.90.0070.00916.84
7.2.80.0100.00716.99
7.2.70.0050.00916.90
7.2.60.0080.00817.03
7.2.50.0060.00816.93
7.2.40.0090.00817.02
7.2.30.0070.00917.06
7.2.20.0100.00716.94
7.2.10.0090.00516.93
7.2.00.0050.00817.68
7.1.330.0100.00715.77
7.1.320.0040.00715.75
7.1.310.0080.00415.86
7.1.300.0050.00215.41
7.1.290.0120.00315.55
7.1.280.0040.00415.70
7.1.270.0000.01015.77
7.1.260.0030.00515.88
7.1.250.0050.00715.70
7.1.240.0030.00715.59
7.1.230.0000.01215.58
7.1.220.0120.00415.93
7.1.210.0110.00815.89
7.1.200.0090.00315.81
7.1.190.0100.00315.81
7.1.180.0120.00615.55
7.1.170.0070.00715.51
7.1.160.0090.00315.50
7.1.150.0110.00715.91
7.1.140.0130.00615.79
7.1.130.0090.00615.72
7.1.120.0150.00315.73
7.1.110.0130.00615.85
7.1.100.0120.00315.45
7.1.90.0060.00915.52
7.1.80.0070.00715.68
7.1.70.0080.00616.39
7.1.60.0130.00516.63
7.1.50.0060.01216.31
7.1.40.0070.00716.05
7.1.30.0130.00516.25
7.1.20.0140.00516.10
7.1.10.0120.00616.20
7.1.00.0080.00816.05
7.0.330.0090.00315.40
7.0.320.0090.00615.00
7.0.310.0100.00715.56
7.0.300.0100.00715.04
7.0.290.0130.00615.08
7.0.280.0130.00315.13
7.0.270.0030.01315.49
7.0.260.0100.01015.57
7.0.250.0140.00315.19
7.0.240.0040.00715.56
7.0.230.0170.00015.26
7.0.220.0160.00315.03
7.0.210.0070.01015.14
7.0.200.0110.00515.98
7.0.190.0120.00415.91
7.0.180.0140.00315.94
7.0.170.0130.00515.81
7.0.160.0110.00815.74
7.0.150.0090.00615.81
7.0.140.0090.00615.76
7.0.130.0110.00615.89
7.0.120.0030.01015.91
7.0.110.0020.01115.96
7.0.100.0070.00715.91
7.0.90.0060.00815.81
7.0.80.0090.00515.70
7.0.70.0090.00515.89
7.0.60.0120.00315.90
7.0.50.0030.01215.81
7.0.40.0050.00714.17
7.0.30.0030.00614.21
7.0.20.0040.00714.18
7.0.10.0070.00414.21
7.0.00.0050.00914.11
5.6.380.0030.01014.73
5.6.370.0110.00014.66
5.6.360.0070.01114.29
5.6.350.0030.00513.91
5.6.340.0080.01214.20
5.6.330.0060.00614.56
5.6.320.0060.00314.32
5.6.310.0030.01414.60
5.6.300.0090.02417.60
5.6.290.0070.02617.60
5.6.280.0050.04917.66
5.6.270.0040.03117.69
5.6.260.0110.04217.60
5.6.250.0080.03817.67
5.6.240.0050.04417.57
5.6.230.0050.04017.66
5.6.220.0050.03517.72
5.6.210.0070.02517.64
5.6.200.0080.02617.52
5.6.190.0080.03517.56
5.6.180.0070.02317.69
5.6.170.0100.02017.59
5.6.160.0160.02117.54
5.6.150.0100.02517.46
5.6.140.0080.02317.56
5.6.130.0050.02717.58
5.6.120.0060.03517.73
5.6.110.0060.02917.73
5.6.100.0040.03017.60
5.6.90.0060.02517.62
5.6.80.0050.02417.18
5.6.70.0090.02417.09
5.6.60.0060.02617.15
5.6.50.0020.02917.29
5.6.40.0020.03217.15
5.6.30.0100.01817.20
5.6.20.0050.03917.29
5.6.10.0050.04017.26
5.6.00.0080.04517.31
5.5.380.0050.02414.17
5.5.370.0050.02514.20
5.5.360.0070.02314.21
5.5.350.0060.04014.45
5.5.340.0050.02614.32
5.5.330.0020.02514.63
5.5.320.0020.02714.44
5.5.310.0050.02014.37
5.5.300.0080.02814.44
5.5.290.0050.02514.51
5.5.280.0070.02214.51
5.5.270.0050.02314.51
5.5.260.0050.02314.51
5.5.250.0000.03114.42
5.5.240.0050.02214.18
5.5.230.0050.02314.23
5.5.220.0020.02514.22
5.5.210.0010.02514.22
5.5.200.0030.02614.21
5.5.190.0030.02914.14
5.5.180.0070.03414.25
5.5.170.0050.00511.13
5.5.160.0030.04514.08
5.5.150.0040.02714.08
5.5.140.0060.01914.03
5.5.130.0030.02314.22
5.5.120.0060.02114.14
5.5.110.0060.01713.98
5.5.100.0030.02014.16
5.5.90.0030.02114.03
5.5.80.0070.02814.11
5.5.70.0050.02414.10
5.5.60.0070.02214.11
5.5.50.0050.02314.00
5.5.40.0030.02414.04
5.5.30.0070.02013.94
5.5.20.0020.02314.00
5.5.10.0060.02214.25
5.5.00.0000.02714.32
5.4.450.0100.03715.17
5.4.440.0080.02215.27
5.4.430.0040.02515.21
5.4.420.0090.01915.04
5.4.410.0000.02415.31
5.4.400.0050.03114.90
5.4.390.0080.02214.98
5.4.380.0020.03114.94
5.4.370.0060.02315.06
5.4.360.0030.02215.03
5.4.350.0040.02414.94
5.4.340.0050.03315.04
5.4.330.0030.00310.95
5.4.320.0030.03514.99
5.4.310.0070.02314.97
5.4.300.0030.03215.08
5.4.290.0020.02414.93
5.4.280.0060.02315.03
5.4.270.0010.02614.79
5.4.260.0080.02214.97
5.4.250.0030.02315.05
5.4.240.0060.02314.98
5.4.230.0020.02614.96
5.4.220.0040.02314.85
5.4.210.0080.01814.89
5.4.200.0030.02514.94
5.4.190.0090.02414.89
5.4.180.0000.02614.99
5.4.170.0040.02114.85
5.4.160.0070.02015.09
5.4.150.0030.02514.88
5.4.140.0050.02313.71
5.4.130.0020.02313.71
5.4.120.0030.02413.69
5.4.110.0100.01513.59
5.4.100.0030.02213.72
5.4.90.0070.01913.73
5.4.80.0050.01913.86
5.4.70.0060.02113.59
5.4.60.0030.02113.47
5.4.50.0030.02313.61
5.4.40.0080.01613.82
5.4.30.0000.02713.85
5.4.20.0020.02513.75
5.4.10.0050.02113.73
5.4.00.0070.03513.46
5.3.290.0040.02912.70
5.3.280.0030.02412.66
5.3.270.0050.02312.69
5.3.260.0040.02312.70
5.3.250.0020.02412.64
5.3.240.0080.02112.67
5.3.230.0020.02212.64
5.3.220.0030.02112.55
5.3.210.0060.02312.61
5.3.200.0030.02112.60
5.3.190.0020.02212.66
5.3.180.0020.02412.61
5.3.170.0070.03012.72
5.3.160.0040.02512.68
5.3.150.0050.01912.73
5.3.140.0050.02012.67
5.3.130.0050.02212.55
5.3.120.0100.02212.66
5.3.110.0020.02512.67
5.3.100.0020.02312.63
5.3.90.0080.03412.59
5.3.80.0050.03212.61
5.3.70.0040.02512.49
5.3.60.0070.03012.54
5.3.50.0030.04412.68
5.3.40.0020.02212.71
5.3.30.0050.02012.71
5.3.20.0090.02512.60
5.3.10.0030.02212.61
5.3.00.0060.03712.53
5.2.170.0050.03612.18
5.2.160.0070.02212.20
5.2.150.0000.01912.20
5.2.140.0030.01712.15
5.2.130.0030.01712.06
5.2.120.0050.01512.18
5.2.110.0040.02112.18
5.2.100.0050.03112.03
5.2.90.0040.02012.17
5.2.80.0050.02012.05
5.2.70.0030.03411.96
5.2.60.0080.01612.10
5.2.50.0060.02212.12
5.2.40.0030.01812.11
5.2.30.0070.02712.04
5.2.20.0050.03411.98
5.2.10.0100.01612.03
5.2.00.0040.01812.05
5.1.60.0000.01811.94
5.1.50.0000.01911.94
5.1.40.0030.01811.94
5.1.30.0030.02411.94
5.1.20.0030.01611.94
5.1.10.0050.01411.94
5.1.00.0050.01311.94
5.0.50.0080.01311.94
5.0.40.0030.01111.94
5.0.30.0050.02511.94
5.0.20.0030.01111.94
5.0.10.0060.00711.94
5.0.00.0000.02011.94
4.4.90.0030.01711.94
4.4.80.0020.02011.94
4.4.70.0050.02011.94
4.4.60.0050.00711.94
4.4.50.0020.01711.94
4.4.40.0030.01311.94
4.4.30.0000.01211.94
4.4.20.0020.01011.94
4.4.10.0030.01011.94
4.4.00.0050.01211.94
4.3.110.0030.00911.94
4.3.100.0020.00911.94
4.3.90.0020.01111.94
4.3.80.0000.01511.94
4.3.70.0020.00911.94
4.3.60.0030.01011.94
4.3.50.0010.01111.94
4.3.40.0030.01311.94
4.3.30.0020.01011.94
4.3.20.0020.00911.94
4.3.10.0020.01011.94
4.3.00.0020.00911.94

preferences:
34.94 ms | 400 KiB | 5 Q