3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $a = 0; public function printCount() { print $this -> a; print PHP_EOL; // print a new line. } } class B { public $b = 0; public function doSomethingWith( $a ) { $a -> a++; } } $a = new A(); $b = new B(); $a -> printCount(); $b -> doSomethingWith( $a ); $a -> printCount();

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.0080.00818.65
8.3.50.0040.01521.19
8.3.40.0060.00918.72
8.3.30.0110.00318.84
8.3.20.0070.00020.39
8.3.10.0000.00823.53
8.3.00.0040.00423.56
8.2.180.0160.00616.63
8.2.170.0070.00722.96
8.2.160.0130.00322.08
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00817.63
8.2.110.0030.00622.25
8.2.100.0120.00017.75
8.2.90.0040.00419.24
8.2.80.0000.00817.97
8.2.70.0030.00617.75
8.2.60.0000.00817.93
8.2.50.0030.00618.07
8.2.40.0080.00021.12
8.2.30.0030.00519.91
8.2.20.0000.00717.81
8.2.10.0000.00717.97
8.2.00.0080.00018.06
8.1.280.0120.00325.92
8.1.270.0060.00320.20
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0080.00022.66
8.1.230.0040.00717.79
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0030.00617.48
8.1.190.0000.00817.35
8.1.180.0040.00418.10
8.1.170.0060.00318.46
8.1.160.0050.00222.00
8.1.150.0030.00618.82
8.1.140.0000.00717.31
8.1.130.0000.00817.61
8.1.120.0030.00517.43
8.1.110.0050.00217.25
8.1.100.0040.00417.39
8.1.90.0070.00017.47
8.1.80.0040.00417.44
8.1.70.0030.00317.38
8.1.60.0000.00717.48
8.1.50.0030.00617.48
8.1.40.0000.00817.39
8.1.30.0030.00617.34
8.1.20.0000.00817.62
8.1.10.0000.00717.48
8.1.00.0080.00017.52
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0040.00418.48
8.0.270.0030.00317.27
8.0.260.0050.00517.18
8.0.250.0050.00216.99
8.0.240.0040.00417.07
8.0.230.0030.00316.85
8.0.220.0030.00616.90
8.0.210.0030.00516.91
8.0.200.0000.00716.97
8.0.190.0040.00416.83
8.0.180.0060.00316.89
8.0.170.0040.00416.82
8.0.160.0020.00516.89
8.0.150.0000.00716.88
8.0.140.0000.00816.84
8.0.130.0070.00313.30
8.0.120.0080.00016.84
8.0.110.0040.00416.76
8.0.100.0030.00416.79
8.0.90.0040.00416.86
8.0.80.0090.01216.82
8.0.70.0040.00416.76
8.0.60.0000.00716.75
8.0.50.0040.00416.84
8.0.30.0090.00916.97
8.0.20.0100.01617.40
8.0.10.0030.00317.06
8.0.00.0100.00816.73
7.4.330.0030.00315.08
7.4.320.0070.00016.44
7.4.300.0030.00316.49
7.4.290.0030.00316.53
7.4.280.0040.00416.58
7.4.270.0040.00416.62
7.4.260.0040.00416.39
7.4.250.0000.00716.56
7.4.240.0000.00716.50
7.4.230.0020.00516.50
7.4.220.0070.01416.45
7.4.210.0090.00616.61
7.4.200.0060.00316.39
7.4.160.0030.01216.67
7.4.150.0090.00817.40
7.4.140.0120.01017.86
7.4.130.0080.01016.60
7.4.120.0080.01116.53
7.4.110.0120.01216.39
7.4.100.0150.00616.56
7.4.90.0110.00716.62
7.4.80.0100.00719.39
7.4.70.0030.01316.52
7.4.60.0150.00316.37
7.4.50.0030.00616.37
7.4.40.0050.01116.58
7.4.30.0200.00316.56
7.4.00.0130.00314.89
7.3.330.0000.00613.26
7.3.320.0030.00313.36
7.3.310.0030.00316.23
7.3.300.0030.00316.39
7.3.290.0060.01016.40
7.3.280.0140.00616.36
7.3.270.0130.00617.40
7.3.260.0070.01116.61
7.3.250.0080.00916.42
7.3.240.0120.00916.36
7.3.230.0130.00516.54
7.3.210.0120.00616.51
7.3.200.0030.01216.60
7.3.190.0060.01016.61
7.3.180.0120.00616.59
7.3.170.0140.00716.34
7.3.160.0120.01016.55
7.3.10.0040.00716.54
7.3.00.0050.00516.37
7.2.330.0040.01416.43
7.2.320.0110.00616.81
7.2.310.0060.01116.63
7.2.300.0060.00916.42
7.2.290.0060.01516.48
7.2.130.0000.01416.93
7.2.120.0100.00317.07
7.2.110.0130.00016.65
7.2.100.0060.00316.94
7.2.90.0030.01016.97
7.2.80.0070.00316.92
7.2.70.0040.00816.67
7.2.60.0070.00516.89
7.2.50.0060.00616.86
7.2.40.0000.00916.92
7.2.30.0090.00616.73
7.2.20.0000.01216.67
7.2.10.0030.00716.87
7.2.00.0040.00917.95
7.1.250.0040.00415.60
7.1.200.0100.00315.72
7.1.100.0000.01118.09
7.1.70.0050.00317.15
7.1.60.0100.01019.12
7.1.50.0090.00616.93
7.1.00.0000.08022.51
7.0.200.0070.00016.61
7.0.60.0030.06319.96
7.0.50.0000.06717.87
7.0.40.0070.04020.18
7.0.30.0330.07320.08
7.0.20.0270.04320.22
7.0.10.0030.06020.07
7.0.00.0070.04320.23
5.6.280.0000.06721.05
5.6.210.0100.06720.49
5.6.200.0030.08018.20
5.6.190.0070.08320.51
5.6.180.0500.07320.48
5.6.170.0170.08020.41
5.6.160.0030.08320.53
5.6.150.0100.04718.23
5.6.140.0000.08718.18
5.6.130.0070.04318.17
5.6.120.0070.08721.15
5.6.110.0030.04321.10
5.6.100.0100.06720.98
5.6.90.0030.07020.98
5.6.80.0070.05320.51
5.5.350.4200.04320.53
5.5.340.0030.08317.96
5.5.330.0030.04320.43
5.5.320.0170.05720.20
5.5.310.0270.07320.51
5.5.300.0100.08317.98
5.5.290.0000.04318.04
5.5.280.0070.05320.98
5.5.270.0030.04320.78
5.5.260.0230.06720.87
5.5.250.0030.04020.46
5.5.240.0000.08020.37
5.4.450.0730.07319.46
5.4.440.0630.07719.30
5.4.430.0900.06319.48
5.4.420.0770.05719.54
5.4.410.0770.05719.45
5.4.400.0870.05319.28
5.4.390.1000.06019.28
5.4.380.1030.05019.26
5.4.370.0930.05719.28
5.4.360.0970.05719.29
5.4.350.1000.05319.38
5.4.340.0770.06719.32
5.4.320.1170.05018.86
5.4.310.1000.05319.29
5.4.300.0730.06719.07
5.4.290.1270.06319.13
5.4.280.1230.07019.12
5.4.270.1030.06718.97
5.4.260.1100.04719.01
5.4.250.1070.07019.25
5.4.240.1170.05719.14
5.4.230.0970.05719.11
5.4.220.1070.05319.26
5.4.210.0870.06019.35
5.4.200.0930.05316.91
5.4.190.0800.05719.02
5.4.180.1000.05319.16
5.4.170.1070.05719.19
5.4.160.0670.06319.13
5.4.150.0800.05318.87
5.4.140.1000.06016.57
5.4.130.0830.06016.40
5.4.120.0830.06716.40
5.4.110.0800.05716.56
5.4.100.0830.05716.77
5.4.90.1030.05316.58
5.4.80.1000.05716.78
5.4.70.0870.06316.58
5.4.60.0730.04716.50
5.4.50.0900.05716.39
5.4.40.0870.06016.38
5.4.30.0930.06016.69
5.4.20.1030.06316.48
5.4.10.1000.04316.36
5.4.00.0400.04715.90
5.3.290.0370.05314.63
5.3.280.0770.06014.82
5.3.270.0930.05314.52
5.3.260.0730.05314.46
5.3.250.0830.06014.46
5.3.240.0270.05314.62
5.3.230.0470.05314.59
5.3.220.0900.05314.65
5.3.210.0330.05314.61
5.3.200.0470.05714.56
5.3.190.0730.05714.58
5.3.180.0930.04314.55
5.3.170.0730.06014.54
5.3.160.0800.06714.54
5.3.150.1200.06314.42
5.3.140.1070.05314.62
5.3.130.1200.06714.78
5.3.120.1130.06314.57
5.3.110.0900.06314.45
5.3.100.0930.04314.12
5.3.90.1000.05313.93
5.3.80.1270.04013.94
5.3.70.0730.06714.09
5.3.60.0830.05714.02
5.3.50.0700.06314.10
5.3.40.0700.05313.87
5.3.30.0970.05313.92
5.3.20.0870.05713.71
5.3.10.0870.06013.74
5.3.00.0770.05713.66
5.2.170.0730.04311.21
5.2.160.0570.04311.17
5.2.150.0570.04011.24
5.2.140.0600.04311.07
5.2.130.0430.05311.02
5.2.120.0570.05711.03
5.2.110.0730.05011.02
5.2.100.0830.05311.00
5.2.90.0670.05011.19
5.2.80.0500.04011.11
5.2.70.0700.04011.10
5.2.60.0570.04311.11
5.2.50.0600.04010.94
5.2.40.0530.04310.90
5.2.30.0570.04310.90
5.2.20.0470.04311.01
5.2.10.0500.04710.72
5.2.00.0570.04010.61
5.1.60.0430.0339.87
5.1.50.0330.04010.00
5.1.40.0430.0409.82
5.1.30.0530.03310.26
5.1.20.0770.05010.29
5.1.10.0670.04310.23
5.1.00.0630.03310.14
5.0.50.0330.0308.56
5.0.40.0430.0278.57
5.0.30.0270.0408.26
5.0.20.0300.0238.36
5.0.10.0200.0308.40
5.0.00.0330.0408.16
4.4.90.0230.0276.64
4.4.80.0300.0236.64
4.4.70.0270.0236.64
4.4.60.0330.0306.64
4.4.50.0330.0206.64
4.4.40.0230.0406.64
4.4.30.0170.0236.64
4.4.20.0300.0236.64
4.4.10.0230.0306.64
4.4.00.0200.0376.64
4.3.110.0330.0276.64
4.3.100.0270.0236.64
4.3.90.0330.0176.64
4.3.80.0270.0336.64
4.3.70.0370.0206.64
4.3.60.0300.0206.64
4.3.50.0130.0276.64
4.3.40.0270.0376.64
4.3.30.0200.0206.64
4.3.20.0200.0206.64
4.3.10.0070.0236.64
4.3.00.0070.0177.24

preferences:
89.96 ms | 401 KiB | 5 Q