3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { private $password; public function __construct($password) { $this->password = $password; } public function getPassword() { return $this->password; } public function syncPassword(User $user) { $user->password = $this->password; } } $user1 = new User('pass1'); $user2 = new User('pass2'); $user1->syncPassword($user2); echo $user2->getPassword();

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.0100.00718.31
8.3.50.0050.01422.05
8.3.40.0070.01120.65
8.3.30.0180.00319.08
8.3.20.0040.00420.33
8.3.10.0070.00021.89
8.3.00.0060.00317.68
8.2.180.0030.01718.54
8.2.170.0070.00722.96
8.2.160.0100.00720.38
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0030.01026.16
8.2.120.0040.00420.88
8.2.110.0060.00322.16
8.2.100.0120.00019.33
8.2.90.0060.00319.22
8.2.80.0080.00017.97
8.2.70.0060.00317.63
8.2.60.0040.00418.03
8.2.50.0030.00618.07
8.2.40.0040.00418.15
8.2.30.0040.00418.16
8.2.20.0000.00717.75
8.2.10.0040.00417.94
8.2.00.0000.00817.63
8.1.280.0130.00725.92
8.1.270.0090.00023.99
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.96
8.1.230.0070.00419.02
8.1.220.0060.00317.74
8.1.210.0000.00918.77
8.1.200.0000.00917.35
8.1.190.0000.00817.10
8.1.180.0000.00818.10
8.1.170.0000.00818.43
8.1.160.0000.00822.01
8.1.150.0070.00318.87
8.1.140.0040.00417.26
8.1.130.0000.00817.90
8.1.120.0040.00417.39
8.1.110.0000.00817.40
8.1.100.0030.00517.37
8.1.90.0050.00517.41
8.1.80.0040.00417.40
8.1.70.0030.00317.36
8.1.60.0030.00617.63
8.1.50.0040.00417.53
8.1.40.0040.00417.51
8.1.30.0080.00017.53
8.1.20.0030.00517.67
8.1.10.0000.00817.57
8.1.00.0060.00317.43
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0040.00418.46
8.0.270.0030.00317.27
8.0.260.0030.00317.20
8.0.250.0000.00716.95
8.0.240.0030.00317.09
8.0.230.0040.00416.97
8.0.220.0000.00716.81
8.0.210.0000.00716.81
8.0.200.0030.00616.85
8.0.190.0000.00816.94
8.0.180.0000.00716.94
8.0.170.0040.00416.94
8.0.160.0070.00016.95
8.0.150.0030.00516.73
8.0.140.0000.00716.92
8.0.130.0050.00013.36
8.0.120.0050.00316.75
8.0.110.0060.00316.88
8.0.100.0000.00716.92
8.0.90.0030.00316.73
8.0.80.0120.00316.88
8.0.70.0070.00016.89
8.0.60.0050.00316.94
8.0.50.0000.00716.92
8.0.30.0170.00517.08
8.0.20.0130.00617.40
8.0.10.0000.00816.99
8.0.00.0040.01616.68
7.4.330.0060.00015.00
7.4.320.0030.00316.46
7.4.300.0060.00016.62
7.4.290.0050.00316.50
7.4.280.0000.00716.60
7.4.270.0030.00316.41
7.4.260.0040.00416.63
7.4.250.0050.00216.38
7.4.240.0030.00316.55
7.4.230.0000.00716.42
7.4.220.0090.00916.59
7.4.210.0080.00616.65
7.4.200.0070.00016.63
7.4.160.0030.01316.42
7.4.150.0090.01217.40
7.4.140.0080.01517.86
7.4.130.0050.01316.43
7.4.120.0160.00516.33
7.4.110.0110.00616.62
7.4.100.0030.01716.48
7.4.90.0100.01416.48
7.4.80.0120.00619.39
7.4.70.0030.01316.45
7.4.60.0110.00716.60
7.4.50.0030.00316.54
7.4.40.0200.00416.41
7.4.30.0080.00816.43
7.4.00.0030.01314.90
7.3.330.0000.00613.13
7.3.320.0000.00513.35
7.3.310.0040.00416.41
7.3.300.0030.00316.18
7.3.290.0070.01316.32
7.3.280.0080.00916.30
7.3.270.0030.01317.40
7.3.260.0130.00316.33
7.3.250.0070.01316.39
7.3.240.0130.00316.27
7.3.230.0120.00416.39
7.3.210.0100.00716.33
7.3.200.0110.00719.39
7.3.190.0040.01516.39
7.3.180.0090.00916.36
7.3.170.0160.00616.49
7.3.160.0090.00916.45
7.3.120.0120.00314.68
7.2.330.0090.00916.39
7.2.320.0070.01016.36
7.2.310.0080.00816.49
7.2.300.0040.01516.63
7.2.290.0190.00316.63
7.2.60.0030.01016.86
7.2.00.0040.01419.21
7.1.200.0000.01115.66
7.1.100.0030.01018.15
7.1.70.0030.00717.12
7.1.60.0100.00619.25
7.1.50.0000.01616.95
7.1.00.0000.07322.44
7.0.200.0000.00716.69
7.0.140.0070.07022.01
7.0.60.0230.06319.79
7.0.50.0030.08717.87
7.0.40.0100.07720.42
7.0.30.0370.06020.23
7.0.20.0230.08020.19
7.0.10.0000.07720.23
7.0.00.0070.08020.12
5.6.280.0000.07721.10
5.6.210.0100.08020.76
5.6.200.0100.04718.18
5.6.190.0030.05720.67
5.6.180.4130.04320.41
5.6.170.0400.05320.50
5.6.160.0200.07320.57
5.6.150.0170.03718.14
5.6.140.0030.04318.26
5.6.130.0170.07318.28
5.6.120.0100.04720.99
5.6.110.0130.08021.14
5.6.100.0070.08720.99
5.6.90.0100.09021.02
5.6.80.0000.04720.41
5.5.350.0200.05320.38
5.5.340.0070.07717.97
5.5.330.0030.04320.41
5.5.320.3630.04020.30
5.5.310.0200.04020.19
5.5.300.0070.07317.96
5.5.290.0030.04018.05
5.5.280.0130.03720.73
5.5.270.0070.08320.89
5.5.260.0000.04320.73
5.5.250.0100.08320.70
5.5.240.0270.06020.13
5.4.450.0300.07019.28
5.4.440.0170.05019.20
5.4.430.0130.05319.48
5.4.420.0230.04719.32
5.4.410.0270.07019.19
5.4.400.0270.06019.22
5.4.390.0200.04319.09
5.4.380.0230.04718.86
5.4.370.0200.05319.11
5.4.360.0170.05319.16
5.4.350.0200.04018.98
5.4.340.0200.03719.14
5.4.320.0230.05719.19
5.4.310.0200.03719.19
5.4.300.0200.03719.13
5.4.290.0230.07018.86
5.4.280.0170.08019.19
5.4.270.0230.07019.22
5.4.260.0170.04719.30
5.4.250.0130.04319.20
5.4.240.0270.04019.16
5.4.230.0230.06319.19
5.4.220.0230.06718.99
5.4.210.0200.04318.86
5.4.200.0200.05019.30
5.4.190.0200.04718.94
5.4.180.0270.04319.08
5.4.170.0230.07319.30
5.4.160.0270.06318.95
5.4.150.0270.07019.29
5.4.140.0230.07016.38
5.4.130.0230.04316.50
5.4.120.0230.06016.49
5.4.110.0300.06716.47
5.4.100.0200.06316.25
5.4.90.0230.04316.54
5.4.80.0270.04016.55
5.4.70.0170.04016.44
5.4.60.0300.03716.23
5.4.50.0230.07016.23
5.4.40.0300.05316.52
5.4.30.0200.04716.22
5.4.20.0200.05716.43
5.4.10.0370.05316.24
5.4.00.0270.04315.92
5.3.290.0200.03714.68
5.3.280.0230.06714.68
5.3.270.0230.06014.70
5.3.260.0270.07014.53
5.3.250.0370.06014.65
5.3.240.0230.07714.68
5.3.230.0200.05714.52
5.3.220.0230.07014.66
5.3.210.0300.06714.68
5.3.200.0270.06714.65
5.3.190.0230.07314.49
5.3.180.0170.06714.79
5.3.170.0230.06714.49
5.3.160.0170.04314.48
5.3.150.0270.06714.68
5.3.140.0370.03314.65
5.3.130.0200.07014.59
5.3.120.0270.07014.47
5.3.110.0200.05014.63
5.3.100.0300.06313.95
5.3.90.0200.06014.04
5.3.80.0170.07713.95
5.3.70.0200.04714.10
5.3.60.0270.07014.18
5.3.50.0230.04314.18
5.3.40.0300.06313.86
5.3.30.0270.06013.82
5.3.20.0230.03013.79
5.3.10.0300.06013.57
5.3.00.0200.06013.70
5.2.170.0200.05312.41
5.2.160.0230.05312.41
5.2.150.0270.05012.41
5.2.140.0200.03712.41
5.2.130.0130.03012.41
5.2.120.0270.03312.41
5.2.110.0170.06312.41
5.2.100.0170.05712.41
5.2.90.0170.03712.41
5.2.80.0170.04012.41
5.2.70.0200.04012.41
5.2.60.0200.05712.41
5.2.50.0200.04312.41
5.2.40.0170.05712.41
5.2.30.0170.04712.41
5.2.20.0130.04312.41
5.2.10.0130.04712.41
5.2.00.0200.05012.41
5.1.60.0130.04012.41
5.1.50.0230.02312.41
5.1.40.0100.03312.41
5.1.30.0200.05012.41
5.1.20.0230.05012.41
5.1.10.0130.05312.41
5.1.00.0230.04312.41
5.0.50.0100.04312.41
5.0.40.0130.02712.41
5.0.30.0070.06012.41
5.0.20.0100.03312.41
5.0.10.0070.03712.41
5.0.00.0100.04012.41
4.4.90.0030.02012.41
4.4.80.0030.02312.41
4.4.70.0030.02312.41
4.4.60.0070.03312.41
4.4.50.0000.03712.41
4.4.40.0100.04312.41
4.4.30.0130.03012.41
4.4.20.0170.02312.41
4.4.10.0100.02012.41
4.4.00.0100.02712.41
4.3.110.0130.00712.41
4.3.100.0030.03712.41
4.3.90.0070.03712.41
4.3.80.0100.03712.41
4.3.70.0100.02712.41
4.3.60.0170.02012.41
4.3.50.0030.02712.41
4.3.40.0130.04312.41
4.3.30.0000.03712.41
4.3.20.0100.03012.41
4.3.10.0030.02012.41
4.3.00.0030.03712.41

preferences:
41.62 ms | 401 KiB | 5 Q