3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Aself { const AA = 'AA'; public static function get() { return self::AA; } } class Astatic { const AA = 'AA'; public static function get() { return static::AA; } } $t = microtime(true); for ($i = 0; $i < 10000; $i++) { Aself::get(); } echo microtime(true) - $t; echo "\n"; $t = microtime(true); for ($i = 0; $i < 10000; $i++) { Astatic::get(); } echo microtime(true) - $t; echo "\n";

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.4.10.0100.01015.07
7.4.00.0060.01314.94
7.3.130.0100.01014.94
7.3.120.0060.01114.82
7.3.110.0060.01114.66
7.3.100.0060.01114.85
7.3.90.0060.00814.98
7.3.80.0060.00614.85
7.3.70.0050.01214.75
7.3.60.0070.00914.80
7.3.50.0030.01014.82
7.3.40.0070.00514.88
7.3.30.0050.01114.84
7.3.20.0070.00816.50
7.3.10.0060.01016.53
7.3.00.0060.01016.73
7.2.260.0120.00914.95
7.2.250.0030.01315.35
7.2.240.0110.00514.96
7.2.230.0060.00815.16
7.2.220.0050.01115.30
7.2.210.0060.01015.20
7.2.200.0060.00715.16
7.2.190.0050.00915.13
7.2.180.0020.01115.10
7.2.170.0050.01115.21
7.2.160.0080.00615.03
7.2.150.0030.01317.11
7.2.140.0040.01116.85
7.2.130.0050.01016.91
7.2.120.0090.00916.95
7.2.110.0070.01316.79
7.2.100.0090.00916.85
7.2.90.0100.00616.93
7.2.80.0120.00816.80
7.2.70.0140.00516.77
7.2.60.0070.01016.73
7.2.50.0060.00916.88
7.2.40.0080.00716.90
7.2.30.0080.00816.93
7.2.20.0090.00916.65
7.2.10.0040.01116.94
7.2.00.0080.00917.54
7.1.330.0060.01115.64
7.1.320.0030.01015.69
7.1.310.0060.01215.62
7.1.300.0050.00915.55
7.1.290.0030.01215.45
7.1.280.0040.01015.84
7.1.270.0090.00715.78
7.1.260.0030.01415.81
7.1.250.0060.00915.65
7.1.240.0030.01415.75
7.1.230.0000.01015.72
7.1.220.0060.01015.66
7.1.210.0030.01115.52
7.1.200.0080.00415.81
7.1.190.0110.00715.58
7.1.180.0100.00715.62
7.1.170.0030.01315.78
7.1.160.0060.00615.75
7.1.150.0030.01315.84
7.1.140.0030.01315.76
7.1.130.0030.01415.86
7.1.120.0140.00415.90
7.1.110.0000.01215.84
7.1.100.0000.01415.73
7.1.90.0030.01415.56
7.1.80.0080.00415.89
7.1.70.0030.00916.56
7.1.60.0090.00516.46
7.1.50.0020.01116.45
7.1.40.0080.00516.14
7.1.30.0090.00616.22
7.1.20.0000.01416.15
7.1.10.0020.01316.06
7.1.00.0040.00816.26
7.0.330.0000.01915.59
7.0.320.0110.00415.48
7.0.310.0030.01315.45
7.0.300.0030.01415.55
7.0.290.0070.00715.46
7.0.280.0030.01115.44
7.0.270.0030.01315.20
7.0.260.0040.00815.32
7.0.250.0030.01015.46
7.0.240.0040.01415.59
7.0.230.0120.00315.49
7.0.220.0030.00715.13
7.0.210.0040.00715.59
7.0.200.0030.00916.18
7.0.190.0030.00816.06
7.0.180.0040.00715.87
7.0.170.0060.00415.82
7.0.160.0060.00615.83
7.0.150.0030.00815.70
7.0.140.0020.01215.91
7.0.130.0050.00815.90
7.0.120.0030.00816.11
7.0.110.0050.00715.97
7.0.100.0050.01015.85
7.0.90.0030.00915.97
7.0.80.0060.00815.91
7.0.70.0000.01215.92
7.0.60.0000.01215.76
7.0.50.0060.00815.96
7.0.40.0020.01114.43
7.0.30.0070.00714.43
7.0.20.0000.01314.43
7.0.10.0050.00814.43
7.0.00.0060.00814.43
5.6.400.0090.00914.22
5.6.390.0000.01814.29
5.6.380.0040.01814.50
5.6.370.0070.01414.43
5.6.360.0070.01314.48
5.6.350.0080.01214.49
5.6.340.0000.01614.70
5.6.330.0090.00914.27
5.6.320.0060.01214.33
5.6.310.0040.01814.42
5.6.300.0050.02717.66
5.6.290.0030.02717.68
5.6.280.0070.02417.68
5.6.270.0070.02917.51
5.6.260.0060.02617.71
5.6.250.0100.03517.67
5.6.240.0050.03217.67
5.6.230.0070.02717.53
5.6.220.0040.02517.76
5.6.210.0030.03017.64
5.6.200.0080.02617.43
5.6.190.0050.02817.50
5.6.180.0060.02717.51
5.6.170.0080.04617.52
5.6.160.0080.02617.63
5.6.150.0050.05417.59
5.6.140.0070.02717.54
5.6.130.0030.03617.53
5.6.120.0050.02817.41
5.6.110.0050.04117.65
5.6.100.0040.03117.60
5.6.90.0100.02417.54
5.6.80.0100.02317.28
5.6.70.0040.02917.24
5.6.60.0090.02317.29
5.6.50.0030.02717.24
5.6.40.0030.03417.28
5.6.30.0050.02517.35
5.6.20.0050.03217.27
5.6.10.0050.02717.31
5.6.00.0030.02917.27
5.5.380.0050.02915.80
5.5.370.0050.02715.80
5.5.360.0070.02816.00
5.5.350.0110.02016.08
5.5.340.0080.03216.06
5.5.330.0050.02916.14
5.5.320.0080.02716.13
5.5.310.0050.03116.21
5.5.300.0060.02616.13
5.5.290.0050.03116.17
5.5.280.0050.03016.23
5.5.270.0050.05115.81
5.5.260.0030.05016.30
5.5.250.0100.03415.95
5.5.240.0050.02515.93
5.5.230.0030.02915.71
5.5.220.0020.03015.90
5.5.210.0020.03115.96
5.5.200.0050.02515.80
5.5.190.0070.02515.80
5.5.180.0030.03415.84
5.5.170.0030.01714.32
5.5.160.0060.02315.83
5.5.150.0000.03115.75
5.5.140.0050.02715.89
5.5.130.0080.02315.60
5.5.120.0120.02915.75
5.5.110.0070.02215.92
5.5.100.0020.03415.71
5.5.90.0030.02715.65
5.5.80.0080.02215.70
5.5.70.0060.03715.71
5.5.60.0030.02915.69
5.5.50.0020.03015.84
5.5.40.0050.02515.88
5.5.30.0070.02415.71
5.5.20.0030.03215.68
5.5.10.0030.02615.61
5.5.00.0050.03115.69
5.4.450.0010.02716.62
5.4.440.0020.03216.50
5.4.430.0000.03216.63
5.4.420.0000.04416.54
5.4.410.0000.03116.43
5.4.400.0020.03216.50
5.4.390.0200.02916.36
5.4.380.0050.02216.51
5.4.370.0080.02416.48
5.4.360.0020.02616.48
5.4.350.0030.03316.38
5.4.340.0050.02316.48
5.4.330.0000.01613.79
5.4.320.0000.03016.48
5.4.310.0020.03016.39
5.4.300.0020.02716.50
5.4.290.0100.02616.35
5.4.280.0020.02516.34
5.4.270.0100.02116.50
5.4.260.0030.02316.38
5.4.250.0040.02716.51
5.4.240.0060.02616.38
5.4.230.0050.02616.42
5.4.220.0050.02616.50
5.4.210.0070.02516.45
5.4.200.0030.02816.46
5.4.190.0090.03716.43
5.4.180.0030.02716.33
5.4.170.0030.02916.50
5.4.160.0050.02316.47
5.4.150.0060.02216.37
5.4.140.0040.04515.18
5.4.130.0050.02215.13
5.4.120.0030.02515.26
5.4.110.0050.02415.11
5.4.100.0030.02215.21
5.4.90.0030.02415.17
5.4.80.0070.02515.17
5.4.70.0050.02615.24
5.4.60.0000.02415.26
5.4.50.0050.02515.25
5.4.40.0030.02415.23
5.4.30.0000.03015.25
5.4.20.0050.02615.12
5.4.10.0030.02715.12
5.4.00.0020.02814.84
5.3.290.0040.02914.43
5.3.280.0050.02814.43
5.3.270.0020.02814.43
5.3.260.0030.03114.43
5.3.250.0050.02614.43
5.3.240.0030.02714.43
5.3.230.0020.02814.43
5.3.220.0020.03314.43
5.3.210.0020.03314.43
5.3.200.0080.02414.43
5.3.190.0030.03014.43
5.3.180.0020.03014.43
5.3.170.0000.03214.43
5.3.160.0030.02714.43
5.3.150.0050.02514.43
5.3.140.0030.02614.43
5.3.130.0030.02714.43
5.3.120.0020.03414.43
5.3.110.0030.02914.43
5.3.100.0080.02414.43
5.3.90.0040.02714.43
5.3.80.0030.02814.43
5.3.70.0040.02514.43
5.3.60.0020.02914.43
5.3.50.0050.02514.43
5.3.40.0030.02914.43
5.3.30.0030.04614.43
5.3.20.0050.02214.43
5.3.10.0020.02714.43
5.3.00.0020.02714.43
5.2.170.0000.03415.07
5.2.160.0000.02915.07
5.2.150.0030.04015.07
5.2.140.0070.03915.07
5.2.130.0030.02715.07
5.2.120.0000.03315.07
5.2.110.0040.02815.07
5.2.100.0100.03515.07
5.2.90.0030.03015.07
5.2.80.0060.02815.07
5.2.70.0100.03515.07
5.2.60.0000.03015.07
5.2.50.0060.05115.07
5.2.40.0030.05715.07
5.2.30.0030.03215.07
5.2.20.0030.05715.07
5.2.10.0000.04115.07
5.2.00.0000.05015.07
5.1.60.0070.04215.07
5.1.50.0030.04015.07
5.1.40.0000.02615.07
5.1.30.0060.02215.07
5.1.20.0040.02915.07
5.1.10.0000.02715.07
5.1.00.0070.02715.07
5.0.50.0000.02315.07
5.0.40.0030.04415.07
5.0.30.0000.05915.07
5.0.20.0000.02315.07
5.0.10.0030.01915.07
5.0.00.0000.03315.07
4.4.90.0030.01315.07
4.4.80.0060.01915.07
4.4.70.0030.02415.07
4.4.60.0030.01815.07
4.4.50.0000.02615.07
4.4.40.0000.02915.07
4.4.30.0000.01715.07
4.4.20.0000.01615.07
4.4.10.0000.01915.07
4.4.00.0000.02715.07
4.3.110.0000.02415.07
4.3.100.0000.02015.07
4.3.90.0000.01815.07
4.3.80.0030.02315.07
4.3.70.0040.01515.07
4.3.60.0000.02315.07
4.3.50.0000.01615.07
4.3.40.0000.02515.07
4.3.30.0000.01715.07
4.3.20.0000.01715.07
4.3.10.0000.01915.07
4.3.00.0070.02015.07

preferences:
40.43 ms | 401 KiB | 5 Q