3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Counter { private $counter = 0; public function getCount() { return $this->counter; } public function increment() { $this->counter = $this->getCount() + 1; } } class CounterOfssetByOne extends Counter { public function getCount() { return parent::getCount() + 1; } } $counter = new CounterOfssetByOne; $counter->increment(); $counter->increment(); var_dump($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.3.60.0070.01116.63
8.3.50.0080.00921.99
8.3.40.0150.00618.70
8.3.30.0000.01518.38
8.3.20.0080.00020.38
8.3.10.0080.00023.52
8.3.00.0040.00419.25
8.2.180.0120.00316.75
8.2.170.0140.00022.96
8.2.160.0120.00320.37
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0090.00017.38
8.2.120.0030.00526.35
8.2.110.0060.00322.11
8.2.100.0090.00317.60
8.2.90.0090.00017.91
8.2.80.0060.00317.97
8.2.70.0000.00817.91
8.2.60.0030.00518.03
8.2.50.0030.00618.10
8.2.40.0000.00919.17
8.2.30.0040.00420.31
8.2.20.0060.00317.65
8.2.10.0040.00417.99
8.2.00.0070.00017.97
8.1.280.0100.00725.92
8.1.270.0080.00021.96
8.1.260.0000.00828.09
8.1.250.0060.00328.09
8.1.240.0040.00422.06
8.1.230.0080.00422.50
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0030.00517.23
8.1.180.0080.00018.10
8.1.170.0060.00318.65
8.1.160.0040.00418.89
8.1.150.0000.00718.72
8.1.140.0060.00319.51
8.1.130.0000.00718.92
8.1.120.0060.00317.34
8.1.110.0040.00417.34
8.1.100.0060.00317.37
8.1.90.0000.00717.43
8.1.80.0030.00517.28
8.1.70.0000.00717.30
8.1.60.0050.00317.63
8.1.50.0050.00317.50
8.1.40.0090.00017.52
8.1.30.0060.00317.64
8.1.20.0030.00617.52
8.1.10.0040.00417.53
8.1.00.0060.00317.39
8.0.300.0070.00019.73
8.0.290.0060.00316.58
8.0.280.0040.00418.25
8.0.270.0030.00317.32
8.0.260.0000.00718.40
8.0.250.0000.00716.94
8.0.240.0060.00016.90
8.0.230.0030.00316.88
8.0.220.0040.00416.83
8.0.210.0030.00616.78
8.0.200.0030.00316.88
8.0.190.0030.00316.88
8.0.180.0050.00216.84
8.0.170.0080.00016.73
8.0.160.0000.00816.74
8.0.150.0040.00416.70
8.0.140.0050.00316.68
8.0.130.0030.00313.31
8.0.120.0040.00416.68
8.0.110.0000.00716.89
8.0.100.0040.00416.77
8.0.90.0040.00416.89
8.0.80.0030.01216.75
8.0.70.0040.00416.70
8.0.60.0070.00016.70
8.0.50.0040.00416.69
8.0.30.0090.01017.07
8.0.20.0090.00917.40
8.0.10.0000.00716.86
8.0.00.0030.01416.74
7.4.330.0050.00016.84
7.4.320.0030.00316.45
7.4.300.0060.00016.39
7.4.290.0000.00716.49
7.4.280.0030.00516.61
7.4.270.0040.00716.66
7.4.260.0030.00316.57
7.4.250.0030.00716.56
7.4.240.0020.00516.48
7.4.230.0000.00716.70
7.4.220.0140.00716.61
7.4.210.0060.00916.62
7.4.200.0030.00316.63
7.4.160.0120.00416.56
7.4.150.0040.01517.40
7.4.140.0110.01017.86
7.4.130.0060.01316.41
7.4.120.0060.01016.58
7.4.110.0090.01216.39
7.4.100.0100.01316.48
7.4.90.0060.01116.56
7.4.80.0060.01219.39
7.4.70.0150.00716.39
7.4.60.0110.01116.23
7.4.50.0070.01116.54
7.4.40.0070.01116.60
7.4.30.0160.00716.34
7.4.00.0040.01115.04
7.3.330.0000.00513.22
7.3.320.0030.00313.30
7.3.310.0000.00716.21
7.3.300.0030.00316.32
7.3.290.0080.00716.30
7.3.280.0090.00816.30
7.3.270.0080.00817.40
7.3.260.0160.00916.35
7.3.250.0130.01016.32
7.3.240.0110.00916.28
7.3.230.0180.00016.46
7.3.210.0100.00616.42
7.3.200.0060.01316.36
7.3.190.0120.01016.45
7.3.180.0070.01416.54
7.3.170.0070.01016.51
7.3.160.0120.00416.61
7.3.10.0490.01014.91
7.3.00.0320.01114.56
7.2.330.0160.00316.61
7.2.320.0100.01016.52
7.2.310.0030.01316.44
7.2.300.0150.00316.77
7.2.290.0040.01416.49
7.2.130.0530.00314.73
7.2.120.0250.00915.11
7.2.110.0520.00314.95
7.2.100.0310.00615.18
7.2.90.0360.00315.13
7.2.80.0410.00315.07
7.2.70.0350.00315.09
7.2.60.0180.00515.95
7.2.50.0280.00915.13
7.2.40.0370.00015.21
7.2.30.0250.00716.43
7.2.20.0430.00714.86
7.2.10.0380.00415.11
7.2.00.0260.00717.27
7.1.250.0330.00713.93
7.1.240.0360.00013.69
7.1.230.0440.00313.84
7.1.220.0360.00313.50
7.1.210.0360.00313.42
7.1.200.0180.01014.66
7.1.190.0370.00713.36
7.1.180.0350.00013.67
7.1.170.0330.00313.77
7.1.160.0560.00013.30
7.1.150.0430.00713.50
7.1.140.0480.00313.78
7.1.130.0400.00013.89
7.1.120.0400.00013.85
7.1.110.0420.00013.69
7.1.100.0160.01115.85
7.1.90.0370.00713.89
7.1.80.0370.01013.96
7.1.70.0210.00415.34
7.1.60.0240.00916.66
7.1.50.0230.00715.29
7.1.40.0490.00313.77
7.1.30.0380.00913.82
7.1.20.0350.01013.59
7.1.10.0370.00713.78
7.1.00.0350.03818.09
7.0.330.0400.00813.59
7.0.320.0340.00613.44
7.0.310.0520.00313.67
7.0.300.0400.00013.66
7.0.290.0370.00313.62
7.0.280.1110.00713.71
7.0.270.0310.01013.30
7.0.260.0390.00713.45
7.0.250.0360.00613.78
7.0.240.0330.00713.64
7.0.230.0340.00313.66
7.0.220.0340.00313.61
7.0.210.0420.01113.56
7.0.200.0230.00515.21
7.0.190.0350.00613.53
7.0.180.0360.00613.54
7.0.170.0390.00413.35
7.0.160.0440.00713.56
7.0.150.0530.00313.58
7.0.140.1220.00713.47
7.0.130.0480.00013.70
7.0.120.0380.00713.50
7.0.110.0410.00613.46
7.0.100.0390.00713.55
7.0.90.0550.00713.63
7.0.80.0390.00613.68
7.0.70.0390.01013.61
7.0.60.0270.04316.79
7.0.50.0310.03815.70
7.0.40.0270.02717.01
7.0.30.0350.03217.00
7.0.20.0420.02816.79
7.0.10.0440.03716.95
7.0.00.0260.04016.95
5.6.380.0060.01214.34
5.6.370.0080.00414.55
5.6.360.0060.00614.64
5.6.350.0110.00814.37
5.6.340.0040.00714.61
5.6.330.0030.01314.66
5.6.320.0000.01114.23
5.6.310.0080.00814.55
5.6.300.0070.00614.30
5.6.290.0030.00914.15
5.6.280.0090.01717.85
5.6.270.0030.01214.44
5.6.260.0070.00414.46
5.6.250.0110.00514.47
5.6.240.0040.00714.17
5.6.230.0090.00614.52
5.6.220.0040.01114.37
5.6.210.0060.02817.49
5.6.200.0050.02516.14
5.6.190.0050.03417.48
5.6.180.0230.03317.47
5.6.170.0150.04017.40
5.6.160.0100.04317.48
5.6.150.0060.02916.25
5.6.140.0020.02716.19
5.6.130.0060.04616.41
5.6.120.0080.04217.61
5.6.110.0150.03617.61
5.6.100.0090.05117.87
5.6.90.0020.02517.60
5.6.80.0070.04717.40
5.6.70.0150.00414.32
5.6.60.0040.00714.38
5.6.50.0130.00314.28
5.6.40.0000.01514.09
5.6.30.0050.00514.45
5.6.20.0070.01314.41
5.6.10.0030.01014.41
5.6.00.0070.00314.33
5.5.380.0110.00411.18
5.5.370.0130.00311.35
5.5.360.0100.00511.01
5.5.350.0150.03515.78
5.5.340.0080.02314.54
5.5.330.0120.03915.83
5.5.320.0060.02815.54
5.5.310.0170.02915.75
5.5.300.0060.02514.66
5.5.290.0050.02214.56
5.5.280.0090.03216.00
5.5.270.0070.04915.77
5.5.260.0030.03115.93
5.5.250.0130.03815.98
5.5.240.2070.01915.76
5.5.230.0090.00411.11
5.5.220.0090.00610.93
5.5.210.0030.00611.14
5.5.200.0100.00511.09
5.5.190.0090.00311.04
5.5.180.0070.00411.26
5.5.170.0080.00011.30
5.5.160.0080.00311.06
5.5.150.0080.00811.29
5.5.140.0060.00611.34
5.5.130.0120.00311.23
5.5.120.0110.00311.18
5.5.110.0130.00311.32
5.5.100.0080.00611.29
5.5.90.0050.00511.32
5.5.80.0050.00911.23
5.5.70.0080.00811.21
5.5.60.0070.00711.30
5.5.50.0110.00411.05
5.5.40.0090.00611.07
5.5.30.0080.00511.06
5.5.20.0050.00711.27
5.5.10.0150.00211.22
5.5.00.0120.00611.05

preferences:
47.8 ms | 401 KiB | 5 Q