3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('a', 'b', 'c', 'd'); usort($array, 'some_sort_function'); function some_sort_function($a, $b) { static $foo = NULL; if ($foo === NULL) { $foo = 'bar'; echo "just once?\n"; } return 0; }

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.0070.01016.75
8.3.50.0120.00822.82
8.3.40.0000.01518.68
8.3.30.0070.00718.95
8.3.20.0040.00420.36
8.3.10.0000.00823.65
8.3.00.0050.00319.25
8.2.180.0090.00616.63
8.2.170.0090.00622.96
8.2.160.0070.00720.43
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00020.89
8.2.110.0030.00622.22
8.2.100.0120.00817.53
8.2.90.0030.00519.05
8.2.80.0050.00317.97
8.2.70.0090.00017.50
8.2.60.0000.00817.92
8.2.50.0080.00018.07
8.2.40.0060.00319.79
8.2.30.0080.00018.06
8.2.20.0080.00017.62
8.2.10.0000.00818.10
8.2.00.0060.00317.66
8.1.280.0100.00725.92
8.1.270.0030.00623.92
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00923.70
8.1.230.0090.00319.17
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0070.00317.36
8.1.190.0000.00817.11
8.1.180.0030.00618.10
8.1.170.0040.00418.69
8.1.160.0040.00422.00
8.1.150.0000.00718.81
8.1.140.0040.00417.32
8.1.130.0030.00317.73
8.1.120.0050.00217.42
8.1.110.0090.00017.38
8.1.100.0080.00017.27
8.1.90.0000.00717.29
8.1.80.0000.00717.36
8.1.70.0000.00817.34
8.1.60.0040.00417.55
8.1.50.0000.00817.36
8.1.40.0030.00617.48
8.1.30.0000.00817.52
8.1.20.0040.00417.50
8.1.10.0040.00417.39
8.1.00.0070.00017.34
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0030.00318.36
8.0.270.0040.00417.17
8.0.260.0000.00617.36
8.0.250.0000.00717.00
8.0.240.0040.00417.04
8.0.230.0030.00317.04
8.0.220.0030.00316.87
8.0.210.0000.00716.97
8.0.200.0030.00516.86
8.0.190.0000.00816.91
8.0.180.0060.00316.81
8.0.170.0080.00016.85
8.0.160.0000.00716.70
8.0.150.0050.00216.72
8.0.140.0000.00816.91
8.0.130.0000.00613.29
8.0.120.0000.00716.89
8.0.110.0000.00716.86
8.0.100.0070.00016.77
8.0.90.0040.00416.77
8.0.80.0090.00616.83
8.0.70.0050.00316.85
8.0.60.0040.00416.92
8.0.50.0070.00016.88
8.0.30.0160.00516.94
8.0.20.0140.00617.40
8.0.10.0040.00416.90
8.0.00.0110.00616.68
7.4.330.0030.00315.15
7.4.320.0060.00016.43
7.4.300.0040.00416.52
7.4.290.0030.00316.61
7.4.280.0080.00316.60
7.4.270.0000.00716.37
7.4.260.0030.00316.63
7.4.250.0070.00016.57
7.4.240.0030.00316.62
7.4.230.0000.00716.71
7.4.220.0090.00916.64
7.4.210.0000.01416.64
7.4.200.0040.00416.43
7.4.160.0100.00716.29
7.4.150.0150.00617.40
7.4.140.0100.00717.86
7.4.130.0090.00816.42
7.4.120.0100.00916.42
7.4.110.0120.00616.54
7.4.100.0060.01216.53
7.4.90.0060.01316.38
7.4.80.0110.00719.39
7.4.70.0090.00916.52
7.4.60.0070.01316.52
7.4.50.0040.00416.57
7.4.40.0120.00316.43
7.4.30.0210.00016.34
7.4.00.0090.00614.98
7.3.330.0030.00313.03
7.3.320.0060.00012.98
7.3.310.0070.00016.06
7.3.300.0030.00316.08
7.3.290.0070.00716.26
7.3.280.0090.00816.20
7.3.270.0110.00717.40
7.3.260.0090.00816.52
7.3.250.0100.01016.22
7.3.240.0030.01316.33
7.3.230.0060.01516.41
7.3.210.0100.00616.39
7.3.200.0140.00319.39
7.3.190.0070.01016.61
7.3.180.0100.00516.30
7.3.170.0130.00316.32
7.3.160.0090.00916.40
7.3.120.0100.00614.64
7.3.110.0070.00714.86
7.3.100.0030.00714.52
7.3.90.0000.01314.81
7.3.80.0070.00714.86
7.3.70.0080.00314.76
7.3.60.0110.00014.78
7.3.50.0030.01014.75
7.3.40.0070.00714.82
7.3.30.0090.00614.68
7.3.20.0000.01516.64
7.3.10.0040.00716.57
7.3.00.0120.00616.47
7.2.330.0030.01516.46
7.2.320.0030.01616.32
7.2.310.0100.00716.72
7.2.300.0090.01216.60
7.2.290.0110.00716.48
7.2.240.0000.01215.12
7.2.230.0030.00714.53
7.2.220.0030.01314.64
7.2.210.0060.00615.07
7.2.200.0060.00915.06
7.2.190.0090.00314.82
7.2.180.0060.00914.83
7.2.170.0030.01114.59
7.2.160.0040.00815.14
7.2.150.0090.00616.67
7.2.140.0060.00916.57
7.2.130.0060.00816.85
7.2.120.0030.01216.52
7.2.110.0020.01016.66
7.2.100.0070.00716.87
7.2.90.0070.00616.77
7.2.80.0070.00616.70
7.2.70.0040.00616.69
7.2.60.0040.01116.87
7.2.50.0070.01016.89
7.2.40.0030.01216.88
7.2.30.0060.00516.94
7.2.20.0040.01016.79
7.2.10.0080.00716.82
7.2.00.0080.00517.59
7.1.330.0040.00815.89
7.1.320.0120.00015.63
7.1.310.0000.01315.63
7.1.300.0060.00915.60
7.1.290.0030.00915.62
7.1.280.0030.01015.80
7.1.270.0110.00415.58
7.1.260.0080.00415.85
7.1.250.0070.00715.39
7.1.240.0060.00615.56
7.1.230.0030.01015.49
7.1.220.0030.01315.81
7.1.210.0090.00615.67
7.1.200.0050.00815.70
7.1.190.0000.01415.82
7.1.180.0110.00015.50
7.1.170.0120.00015.51
7.1.160.0000.01415.64
7.1.150.0000.01515.85
7.1.140.0030.00715.60
7.1.130.0070.00715.84
7.1.120.0030.00815.75
7.1.110.0090.00615.70
7.1.100.0050.00816.87
7.1.90.0110.00415.87
7.1.80.0060.00615.64
7.1.70.0050.00716.29
7.1.60.0050.01417.47
7.1.50.0050.01316.34
7.1.40.0030.00715.67
7.1.30.0100.00315.65
7.1.20.0050.00515.66
7.1.10.0030.01315.82
7.1.00.0030.03919.07
7.0.330.0050.00515.21
7.0.320.0000.00815.41
7.0.310.0040.01115.52
7.0.300.0000.01515.34
7.0.290.0030.00915.19
7.0.280.0100.00315.23
7.0.270.0070.00314.93
7.0.260.0090.00615.39
7.0.250.0030.01015.55
7.0.240.0100.00015.42
7.0.230.0070.00715.33
7.0.220.0140.00015.46
7.0.210.0030.01015.42
7.0.200.0090.00616.11
7.0.190.0030.00515.25
7.0.180.0040.00415.25
7.0.170.0030.01015.16
7.0.160.0060.00615.43
7.0.150.0070.00715.13
7.0.140.0030.04018.51
7.0.130.0070.00715.30
7.0.120.0100.00315.13
7.0.110.0060.00615.30
7.0.100.0000.01215.38
7.0.90.0000.01115.40
7.0.80.0060.00615.29
7.0.70.0040.00815.38
7.0.60.0050.02517.72
7.0.50.0040.04616.72
7.0.40.0070.04216.82
7.0.30.0130.04516.76
7.0.20.0110.02316.69
7.0.10.0070.02216.82
7.0.00.0030.02716.87
5.6.380.0030.01414.16
5.6.370.0040.00814.53
5.6.360.0070.00714.50
5.6.350.0030.00814.57
5.6.340.0070.00714.48
5.6.330.0130.00314.06
5.6.320.0130.00314.32
5.6.310.0070.00414.63
5.6.300.0040.00814.35
5.6.290.0070.00714.09
5.6.280.0080.03717.70
5.6.270.0100.00314.22
5.6.260.0000.00914.41
5.6.250.0030.00714.25
5.6.240.0100.00314.29
5.6.230.0110.00014.39
5.6.220.0060.00614.13
5.6.210.0050.03817.57
5.6.200.0090.04216.20
5.6.190.0080.04217.48
5.6.180.0150.02917.45
5.6.170.0150.02017.54
5.6.160.0090.02017.44
5.6.150.0030.03716.19
5.6.140.0020.02516.15
5.6.130.0000.05016.23
5.6.120.0070.02417.62
5.6.110.0020.05317.60
5.6.100.0080.04517.61
5.6.90.0070.04517.59
5.6.80.0110.03817.20
5.6.70.0070.00714.14
5.6.60.0030.00713.94
5.6.50.0100.00314.16
5.6.40.0060.00914.07
5.6.30.0030.00814.29
5.6.20.0060.00614.19
5.6.10.0070.00714.50
5.6.00.0070.00714.05
5.5.380.0000.00511.05
5.5.370.0070.00011.01
5.5.360.0060.00311.00
5.5.350.0020.04415.79
5.5.340.0030.04014.48
5.5.330.0090.03715.89
5.5.320.0130.02515.73
5.5.310.0160.02915.76
5.5.300.0060.02314.51
5.5.290.0050.04014.56
5.5.280.0030.02215.96
5.5.270.0080.02515.91
5.5.260.0090.04016.13
5.5.250.0070.04015.91
5.5.240.1350.01815.62
5.5.230.0050.00211.20
5.5.220.0000.00911.00
5.5.210.0000.00711.00
5.5.200.0030.00311.04
5.5.190.0030.00611.27
5.5.180.0000.00511.14
5.5.170.0060.00311.09
5.5.160.0080.00311.25
5.5.150.0030.00511.00
5.5.140.0050.00011.19
5.5.130.0050.00211.00
5.5.120.0080.00411.00
5.5.110.0090.00011.15
5.5.100.0000.01011.00
5.5.90.0040.00411.00
5.5.80.0090.00011.00
5.5.70.0040.00411.14
5.5.60.0030.00311.02
5.5.50.0060.00311.16
5.5.40.0070.00011.00
5.5.30.0030.00311.30
5.5.20.0000.00511.24
5.5.10.0070.00011.00
5.5.00.0000.01011.10
5.4.450.0100.02715.45
5.4.440.0150.02815.24
5.4.430.0050.02915.20
5.4.420.0150.02115.31
5.4.410.0100.02415.30
5.4.400.0100.02515.09
5.4.390.0110.02315.26
5.4.380.0150.02614.87
5.4.370.0080.02814.89
5.4.360.0120.02714.77
5.4.350.0150.03514.87
5.4.340.0120.03314.95
5.4.330.0040.00711.00
5.4.320.0060.02611.83
5.4.310.0040.03111.80
5.4.300.0050.02311.75
5.4.290.0040.02311.75
5.4.280.0080.02011.74
5.4.270.0050.02011.81
5.4.260.0050.02411.70
5.4.250.0040.02311.70
5.4.240.0020.02311.70
5.4.230.0030.02611.70
5.4.220.0090.02311.74
5.4.210.0040.02711.70
5.4.200.0040.02111.83
5.4.190.0060.02511.70
5.4.180.0060.02311.76
5.4.170.0070.02211.70
5.4.160.0060.02411.70
5.4.150.0040.02311.70
5.4.140.0040.02011.56
5.4.130.0070.02011.53
5.4.120.0040.02211.51
5.4.110.0040.02911.65
5.4.100.0030.02411.59
5.4.90.0040.02411.55
5.4.80.0060.02011.51
5.4.70.0050.02111.51
5.4.60.0050.02011.52
5.4.50.0080.02511.51
5.4.40.0060.02411.50
5.4.30.0060.02211.50
5.4.20.0040.02211.50
5.4.10.0090.01811.50
5.4.00.0060.02011.33
5.3.290.0080.02411.90
5.3.280.0040.02411.86
5.3.270.0030.02411.86
5.3.260.0040.02311.86
5.3.250.0070.02111.86
5.3.240.0050.02211.86
5.3.230.0050.02011.86
5.3.220.0040.02411.84
5.3.210.0030.02311.84
5.3.200.0050.02011.84
5.3.190.0050.02211.84
5.3.180.0040.02411.84
5.3.170.0070.02211.84
5.3.160.0050.02211.84
5.3.150.0080.01911.84
5.3.140.0060.01811.83
5.3.130.0040.02411.83
5.3.120.0050.02311.83
5.3.110.0030.02411.83
5.3.100.0040.02011.56
5.3.90.0030.02311.55
5.3.80.0030.02311.55
5.3.70.0030.02411.55
5.3.60.0060.02311.54
5.3.50.0050.02811.51
5.3.40.0040.02611.52
5.3.30.0110.02111.49
5.3.20.0050.02711.38
5.3.10.0100.02411.36
5.3.00.0070.02711.36
5.2.170.0050.02410.11
5.2.160.0050.01810.11
5.2.150.0040.01810.11
5.2.140.0020.02110.11
5.2.130.0040.01610.09
5.2.120.0020.01810.09
5.2.110.0040.01710.09
5.2.100.0060.02110.09
5.2.90.0050.02210.09
5.2.80.0020.02410.09
5.2.70.0020.02110.09
5.2.60.0020.01810.06
5.2.50.0040.01710.05
5.2.40.0050.01410.04
5.2.30.0050.01810.02
5.2.20.0070.01510.02
5.2.10.0020.0199.97
5.2.00.0030.0199.90
5.1.60.0030.0159.55
5.1.50.0050.0129.54
5.1.40.0040.0139.54
5.1.30.0040.0149.71
5.1.20.0060.0149.72
5.1.10.0040.0159.58
5.1.00.0040.0159.58
5.0.50.0020.0148.82
5.0.40.0040.0098.75
5.0.30.0040.0178.66
5.0.20.0040.0098.64
5.0.10.0030.0128.63
5.0.00.0050.0198.63
4.4.90.0020.0137.89
4.4.80.0020.0127.88
4.4.70.0010.0107.88
4.4.60.0020.0097.88
4.4.50.0020.0077.89
4.4.40.0030.0137.86
4.4.30.0010.0117.88
4.4.20.0040.0097.92
4.4.10.0010.0117.93
4.4.00.0030.0177.88
4.3.110.0020.0127.84
4.3.100.0020.0127.83
4.3.90.0020.0147.82
4.3.80.0010.0197.79
4.3.70.0030.0117.82
4.3.60.0060.0087.81
4.3.50.0020.0147.81
4.3.40.0050.0157.77
4.3.30.0030.0117.15
4.3.20.0030.0117.14
4.3.10.0030.0117.12
4.3.00.0020.01213.31

preferences:
45.94 ms | 401 KiB | 5 Q