3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Counter { /** @return self */ public function count(); /** @return int */ public function getCount(); } class FluentCounter implements Counter { private $count = 0; public function count() { $this->count += 1; return $this; } public function getCount() { return $this->count; } } $counter = new FluentCounter(); $counter = $counter->count()->count()->count(); echo $counter->getCount();

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.4.20.0100.01017.72
8.4.10.0090.00017.58
8.3.150.0070.01116.98
8.3.140.0040.00416.55
8.3.130.0070.00418.44
8.3.120.0060.00319.07
8.3.110.0030.00620.94
8.3.100.0090.00018.23
8.3.90.0080.00026.77
8.3.80.0040.00418.17
8.3.70.0100.01316.58
8.3.60.0100.01018.30
8.3.50.0090.00721.27
8.3.40.0150.00418.79
8.3.30.0090.00920.26
8.3.20.0030.00518.71
8.3.10.0050.00320.95
8.3.00.0040.00423.48
8.2.260.0120.00318.80
8.2.250.0000.00818.47
8.2.240.0040.00419.00
8.2.230.0040.00422.58
8.2.220.0070.01124.06
8.2.210.0040.00426.77
8.2.200.0100.00016.63
8.2.190.0180.00316.58
8.2.180.0090.00925.92
8.2.170.0070.00722.96
8.2.160.0100.00320.35
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0080.00021.19
8.2.110.0000.00922.12
8.2.100.0040.00717.84
8.2.90.0040.00417.75
8.2.80.0040.00418.73
8.2.70.0060.00317.63
8.2.60.0030.00818.34
8.2.50.0040.00418.10
8.2.40.0050.00321.20
8.2.30.0040.00419.31
8.2.20.0040.00417.64
8.2.10.0050.00317.63
8.2.00.0000.00817.62
8.1.310.0080.00016.81
8.1.300.0120.00618.53
8.1.290.0030.00630.84
8.1.280.0060.01325.92
8.1.270.0070.00024.66
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0090.00022.65
8.1.230.0090.00317.77
8.1.220.0000.00917.78
8.1.210.0040.00418.77
8.1.200.0080.00017.35
8.1.190.0030.00617.23
8.1.180.0060.00318.10
8.1.170.0060.00318.58
8.1.160.0030.00818.49
8.1.150.0030.00618.88
8.1.140.0040.00417.45
8.1.130.0030.00317.48
8.1.120.0050.00317.43
8.1.110.0050.00217.52
8.1.100.0020.00517.50
8.1.90.0000.00717.36
8.1.80.0000.00717.38
8.1.70.0020.00517.41
8.1.60.0070.00217.57
8.1.50.0140.00417.43
8.1.40.0150.00217.52
8.1.30.0150.00317.58
8.1.20.0140.00617.57
8.1.10.0120.00617.46
8.1.00.0160.00517.40
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0030.00318.51
8.0.270.0000.00716.82
8.0.260.0000.00716.73
8.0.250.0000.00716.89
8.0.240.0090.00016.96
8.0.230.0050.00316.86
8.0.220.0030.00316.91
8.0.210.0000.00716.90
8.0.200.0000.00716.95
8.0.190.0140.00716.97
8.0.180.0100.00516.89
8.0.170.0110.00516.92
8.0.160.0150.00216.83
8.0.150.0130.00516.86
8.0.140.0130.00416.85
8.0.130.0110.00515.01
8.0.120.0090.00616.85
8.0.110.0050.00716.84
8.0.100.0080.00416.86
8.0.90.0080.00516.85
8.0.80.0090.00616.89
8.0.70.0070.00516.83
8.0.60.0080.00416.86
8.0.50.0070.00316.85
8.0.30.0080.00916.89
8.0.20.0090.00917.09
8.0.10.0040.01016.97
8.0.00.0100.00916.88
7.4.330.0130.00716.41
7.4.320.0070.00016.47
7.4.300.0030.00316.61
7.4.290.0040.00716.51
7.4.280.0070.00316.55
7.4.270.0100.00516.49
7.4.260.0090.00314.94
7.4.250.0060.00716.49
7.4.240.0030.00616.48
7.4.230.0060.00616.45
7.4.220.0090.00716.52
7.4.210.0100.00516.50
7.4.200.0070.00316.59
7.4.190.0060.00616.57
7.4.180.0100.00416.49
7.4.160.0110.00516.58
7.4.150.0090.00916.62
7.4.140.0080.00616.89
7.4.130.0080.00916.50
7.4.120.0080.00916.47
7.4.110.0070.00816.43
7.4.100.0080.00816.46
7.4.90.0080.00716.40
7.4.80.0070.01016.95
7.4.70.0080.00816.40
7.4.60.0080.00716.47
7.4.50.0070.00816.41
7.4.40.0100.00717.41
7.4.30.0080.00916.46
7.4.20.0070.01016.40
7.4.10.0120.00616.40
7.4.00.0090.00616.27
7.3.330.0100.00414.65
7.3.320.0100.00314.65
7.3.310.0050.00616.17
7.3.300.0070.00416.08
7.3.290.0070.00416.27
7.3.280.0100.00516.18
7.3.270.0070.00816.45
7.3.260.0100.00817.08
7.3.250.0090.00816.27
7.3.240.0080.00916.21
7.3.230.0080.00716.21
7.3.220.0080.00816.19
7.3.210.0100.00716.18
7.3.200.0100.00616.18
7.3.190.0100.00616.27
7.3.180.0110.00516.23
7.3.170.0110.00616.19
7.3.160.0090.00716.31
7.3.150.0090.00816.30
7.3.140.0110.00616.26
7.3.130.0100.00716.23
7.3.120.0090.00915.97
7.3.110.0080.01115.91
7.3.100.0080.00915.94
7.3.90.0070.00916.17
7.3.80.0090.00815.98
7.3.70.0090.00716.04
7.3.60.0110.00716.09
7.3.50.0080.00815.92
7.3.40.0090.00615.92
7.3.30.0080.00815.87
7.3.20.0730.00615.95
7.3.10.0620.00815.84
7.3.00.0180.00515.76
7.2.340.0110.00916.24
7.2.330.0120.01016.37
7.2.320.0150.00716.34
7.2.310.0160.00716.29
7.2.300.0120.00916.34
7.2.290.0140.00716.34
7.2.280.0130.01016.35
7.2.270.0140.00716.40
7.2.260.0120.00916.37
7.2.250.0120.01016.44
7.2.240.0110.01016.17
7.2.230.0100.01116.15
7.2.220.0150.00516.19
7.2.210.0110.00916.15
7.2.200.0130.00816.35
7.2.190.0140.00816.31
7.2.180.0130.01016.09
7.2.170.0110.00916.17
7.2.160.0130.00815.99
7.2.150.0860.00916.17
7.2.140.0630.00916.15
7.2.130.0180.00916.09
7.2.120.0180.00716.20
7.2.110.0210.00716.03
7.2.100.0240.00616.03
7.2.90.0200.00816.08
7.2.80.0260.00916.13
7.2.70.0420.00816.03
7.2.60.0420.00815.98
7.2.50.0440.00916.01
7.2.40.0360.01015.96
7.2.30.0320.00816.23
7.2.20.0260.00816.13
7.2.10.0210.00816.18
7.2.00.0230.00716.17
7.1.330.0150.01015.45
7.1.320.0140.00615.49
7.1.310.0130.00815.72
7.1.300.0150.00715.52
7.1.290.0100.01015.50
7.1.280.0120.00615.30
7.1.270.0700.00915.07
7.1.260.0600.00815.11
7.1.250.0180.00814.95
7.1.240.0230.00914.86
7.1.230.0240.00614.89
7.1.220.0270.00814.88
7.1.210.0250.00714.92
7.1.200.0420.00814.95
7.1.190.0420.00514.76
7.1.180.0520.00714.81
7.1.170.0450.00714.71
7.1.160.0340.00914.73
7.1.150.0410.00814.89
7.1.140.0220.00714.92
7.1.130.0360.00914.91
7.1.120.0230.00815.05
7.1.110.0220.00715.06
7.1.100.0210.00714.98
7.1.90.0250.00714.93
7.1.80.0310.00715.01
7.1.70.0230.00715.07
7.1.60.0270.00918.12
7.1.50.0270.00918.05
7.1.40.0230.00817.83
7.1.30.0260.00917.92
7.1.20.0240.00817.90
7.1.10.0210.00814.93
7.1.00.0190.00915.00
7.0.330.0240.00714.63
7.0.320.0290.00814.61
7.0.310.0260.00814.53
7.0.300.0380.00814.35
7.0.290.0410.00714.35
7.0.280.0240.00714.40
7.0.270.0220.00714.60
7.0.260.0330.00714.69
7.0.250.0220.00914.73
7.0.240.0260.00714.74
7.0.230.0230.00714.73
7.0.220.0270.00914.71
7.0.210.0270.00914.64
7.0.200.0290.00814.77
7.0.190.0240.00614.78
7.0.180.0280.00814.62
7.0.170.0240.00814.61
7.0.160.0250.00914.64
7.0.150.0230.00714.63
7.0.140.0230.00814.65
7.0.130.0230.00614.65
7.0.120.0390.00814.65
7.0.110.0240.00714.57
7.0.100.0400.00814.51
7.0.90.0240.00714.65
7.0.80.0220.00814.65
7.0.70.0250.00714.66
7.0.60.0220.00714.64
7.0.50.0200.00814.73
7.0.40.0210.00814.45
7.0.30.0180.00714.53
7.0.20.0210.00814.59
7.0.10.0250.00714.60
7.0.00.0200.00714.56
5.6.400.0090.01015.39
5.6.390.0120.01015.46
5.6.380.0110.00815.04
5.6.370.0110.01015.13
5.6.360.0120.00915.15
5.6.350.0140.00915.11
5.6.340.0110.00915.06
5.6.330.0130.00815.12
5.6.320.0130.00815.10
5.6.310.0120.00815.16
5.6.300.0130.01215.66
5.6.290.0110.01515.67
5.6.280.0120.01415.64
5.6.270.0120.01515.70
5.6.260.0140.01415.69
5.6.250.0120.01515.72
5.6.240.0140.01315.67
5.6.230.0130.01315.72
5.6.220.0100.01515.71
5.6.210.0110.01615.69
5.6.200.0120.01515.69
5.6.190.0130.01415.66
5.6.180.0120.01515.61
5.6.170.0120.01315.66
5.6.160.0130.01315.64
5.6.150.0120.01515.68
5.6.140.0130.01315.67
5.6.130.0130.01415.71
5.6.120.0120.01615.68
5.6.110.0120.01315.64
5.6.100.0110.01515.68
5.6.90.0130.01415.71
5.6.80.0110.01415.51
5.6.70.0100.01515.60
5.6.60.0130.01215.62
5.6.50.0130.01215.55
5.6.40.0120.01515.54
5.6.30.0130.01515.52
5.6.20.0110.01415.55
5.6.10.0120.01315.56
5.6.00.0130.01315.54
5.5.380.0110.01314.25
5.5.370.0110.01314.21
5.5.360.0110.01314.14
5.5.350.0110.01314.20
5.5.340.0110.01414.30
5.5.330.0110.01314.25
5.5.320.0100.01214.24
5.5.310.0110.01314.23
5.5.300.0120.01114.25
5.5.290.0100.01214.25
5.5.280.0100.01414.19
5.5.270.0090.01514.24
5.5.260.0120.01414.22
5.5.250.0120.01214.20
5.5.240.0120.01214.18
5.5.230.0110.01214.18
5.5.220.0110.01314.14
5.5.210.0110.01314.19
5.5.200.0140.01014.07
5.5.190.0110.01114.12
5.5.180.0120.01114.13
5.5.170.0110.00914.32
5.5.160.0110.01214.14
5.5.150.0110.01314.16
5.5.140.0110.01214.13
5.5.130.0110.01114.09
5.5.120.0110.01214.12
5.5.110.0110.01214.11
5.5.100.0090.01314.10
5.5.90.0110.01314.09
5.5.80.0120.01214.15
5.5.70.0120.01114.17
5.5.60.0110.01214.11
5.5.50.0110.01314.12
5.5.40.0120.01114.14
5.5.30.0110.01114.15
5.5.20.0100.01214.11
5.5.10.0100.01314.15
5.5.00.0090.01414.17
5.4.450.0090.01112.97
5.4.440.0090.01112.93
5.4.430.0100.01112.93
5.4.420.0090.01312.93
5.4.410.0080.01112.90
5.4.400.0090.01212.87
5.4.390.0110.00912.89
5.4.380.0090.01212.87
5.4.370.0090.01112.87
5.4.360.0100.01112.89
5.4.350.0080.01212.86
5.4.340.0110.00912.80
5.4.330.0080.00712.20
5.4.320.0100.01112.87
5.4.310.0100.01112.89
5.4.300.0090.01012.87
5.4.290.0100.01012.83
5.4.280.0080.01212.86
5.4.270.0100.01112.85
5.4.260.0100.01012.81
5.4.250.0100.01212.81
5.4.240.0100.01212.83
5.4.230.0080.01112.81
5.4.220.0100.01112.80
5.4.210.0090.01112.80
5.4.200.0090.01212.80
5.4.190.0080.01212.75
5.4.180.0090.01212.79
5.4.170.0100.01112.79
5.4.160.0100.00912.79
5.4.150.0100.01112.75
5.4.140.0100.01012.59
5.4.130.0100.00912.62
5.4.120.0090.01212.61
5.4.110.0080.01012.58
5.4.100.0090.01012.56
5.4.90.0080.01412.64
5.4.80.0090.01012.59
5.4.70.0090.01112.63
5.4.60.0080.01012.60
5.4.50.0090.01212.63
5.4.40.0080.01112.64
5.4.30.0080.01012.62
5.4.20.0090.01112.58
5.4.10.0100.01112.60
5.4.00.0110.00912.57
5.3.290.0090.01212.41
5.3.280.0100.01012.34
5.3.270.0090.01012.37
5.3.260.0090.01312.39
5.3.250.0090.01312.43
5.3.240.0090.01212.34
5.3.230.0100.01212.34
5.3.220.0090.01212.26
5.3.210.0100.01012.29
5.3.200.0100.01012.27
5.3.190.0080.01212.29
5.3.180.0100.01112.38
5.3.170.0090.01112.40
5.3.160.0080.01112.41
5.3.150.0100.01112.39
5.3.140.0080.01312.35
5.3.130.0090.01112.34
5.3.120.0100.01012.34
5.3.110.0090.01112.35
5.3.100.0100.01112.34
5.3.90.0100.01112.34
5.3.80.0100.01212.21
5.3.70.0090.01212.23
5.3.60.0100.01112.38
5.3.50.0090.01112.20
5.3.40.0130.01012.21
5.3.30.0110.01112.30
5.3.20.0090.01212.26
5.3.10.0100.01212.02
5.3.00.0090.01112.06

preferences:
72.06 ms | 403 KiB | 5 Q