3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar = 'baz'; protected $baz = 'bar'; public function modify(){ $this->bar = 'bar'; $this->baz = 'baz'; } public function peek($target){ print 'Bar: '.$target->bar; print "\n".'Baz: '.$target->baz; } public function strangerDanger($target){ $target->bar = 'baz1'; $target->baz = 'bar1'; } } $first = new Foo(); $second = new Foo(); $first->modify(); $second->peek($first); $second->strangerDanger($first); $second->peek($first);

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.0120.00318.41
8.3.50.0100.01021.88
8.3.40.0070.01118.59
8.3.30.0100.00719.09
8.3.20.0080.00020.34
8.3.10.0030.00620.53
8.3.00.0000.00819.50
8.2.180.0150.00316.50
8.2.170.0070.00722.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0000.00822.18
8.2.110.0080.00320.82
8.2.100.0080.00417.91
8.2.90.0040.00417.97
8.2.80.0050.00317.97
8.2.70.0030.00617.38
8.2.60.0050.00318.04
8.2.50.0040.00418.07
8.2.40.0040.00418.28
8.2.30.0000.00719.22
8.2.20.0000.00717.69
8.2.10.0050.00317.95
8.2.00.0040.00417.70
8.1.280.0030.01025.92
8.1.270.0040.00423.64
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00622.48
8.1.230.0000.01120.97
8.1.220.0050.00317.74
8.1.210.0040.00718.77
8.1.200.0040.00817.23
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0030.00618.56
8.1.160.0040.00421.84
8.1.150.0000.00718.82
8.1.140.0000.00717.39
8.1.130.0030.00317.90
8.1.120.0030.00517.32
8.1.110.0070.00017.39
8.1.100.0000.00717.37
8.1.90.0000.01117.31
8.1.80.0040.00417.32
8.1.70.0030.00617.39
8.1.60.0000.00717.61
8.1.50.0050.00517.40
8.1.40.0040.00417.48
8.1.30.0080.00017.61
8.1.20.0030.00617.70
8.1.10.0040.00417.57
8.1.00.0050.00617.61
8.0.300.0040.00419.79
8.0.290.0000.00716.75
8.0.280.0030.00318.33
8.0.270.0030.00317.14
8.0.260.0030.00317.31
8.0.250.0030.00316.94
8.0.240.0040.00416.93
8.0.230.0060.00017.02
8.0.220.0030.00316.86
8.0.210.0000.00716.91
8.0.200.0060.00316.96
8.0.190.0080.00017.00
8.0.180.0050.00316.93
8.0.170.0080.00016.89
8.0.160.0050.00216.90
8.0.150.0000.00716.81
8.0.140.0040.00416.75
8.0.130.0000.00513.43
8.0.120.0070.00016.75
8.0.110.0000.00716.71
8.0.100.0070.00016.83
8.0.90.0040.00416.71
8.0.80.0100.00616.82
8.0.70.0000.00816.74
8.0.60.0000.00716.75
8.0.50.0000.00716.72
8.0.30.0120.01216.88
8.0.20.0120.00617.40
8.0.10.0040.00317.01
8.0.00.0110.01116.76
7.4.330.0050.00015.09
7.4.320.0060.00016.58
7.4.300.0030.00316.51
7.4.290.0030.00316.60
7.4.280.0070.00016.61
7.4.270.0000.00816.52
7.4.260.0030.00316.49
7.4.250.0040.00416.55
7.4.240.0020.00516.57
7.4.230.0070.00016.33
7.4.220.0110.00716.56
7.4.210.0070.00716.70
7.4.200.0000.00816.41
7.4.160.0160.00316.50
7.4.150.0170.01017.40
7.4.140.0080.01217.86
7.4.130.0080.00816.69
7.4.120.0060.01116.62
7.4.110.0100.00716.41
7.4.100.0070.01016.50
7.4.90.0170.00016.48
7.4.80.0120.00919.37
7.4.70.0110.00816.58
7.4.60.0120.00916.48
7.4.50.0050.00016.44
7.4.40.0040.01416.26
7.4.30.0090.01616.71
7.4.00.0110.00714.99
7.3.330.0030.00313.32
7.3.320.0000.00513.27
7.3.310.0000.00716.20
7.3.300.0000.00716.36
7.3.290.0100.01016.33
7.3.280.0080.00916.29
7.3.270.0140.00317.40
7.3.260.0120.00616.43
7.3.250.0110.00816.32
7.3.240.0190.00316.28
7.3.230.0060.01016.39
7.3.210.0130.00416.59
7.3.200.0090.00919.39
7.3.190.0100.01016.27
7.3.180.0030.01316.40
7.3.170.0120.00416.43
7.3.160.0130.00316.36
7.2.330.0090.00916.45
7.2.320.0090.01316.74
7.2.310.0100.00716.82
7.2.300.0080.00816.39
7.2.290.0150.00316.79
7.1.100.0040.00718.27
7.1.70.0000.00717.12
7.1.60.0140.01019.32
7.1.50.0070.01817.01
7.1.00.0170.06022.48
7.0.200.0000.00716.57
7.0.140.0100.06322.08
7.0.60.0270.08019.93
7.0.50.0000.05717.72
7.0.40.0130.08320.30
7.0.30.0470.07020.07
7.0.20.0170.04720.16
7.0.10.0030.06020.10
7.0.00.0070.08720.33
5.6.280.0070.07020.90
5.6.210.0070.07320.65
5.6.200.0000.04718.18
5.6.190.0000.08720.64
5.6.180.0300.06020.50
5.6.170.0400.07320.50
5.6.160.0170.07320.54
5.6.150.0030.06018.12
5.6.140.0070.07718.19
5.6.130.0130.07318.14
5.6.120.0030.08721.00
5.6.110.0100.08021.00
5.6.100.0030.08321.14
5.6.90.0070.03721.10
5.6.80.0100.07720.54
5.5.350.4300.04720.41
5.5.340.0070.04017.93
5.5.330.0100.08020.27
5.5.320.0630.06320.27
5.5.310.0300.07320.37
5.5.300.0030.04017.96
5.5.290.0100.08017.92
5.5.280.0170.07320.77
5.5.270.0030.04720.87
5.5.260.0130.06720.84
5.5.250.0100.07720.71
5.5.240.0030.08320.27
5.4.450.4670.04019.57
5.4.440.0070.07319.53
5.4.430.1630.05319.47
5.4.420.4470.03719.49
5.4.410.3730.04019.44
5.4.400.3800.03719.18
5.4.390.3770.03719.15
5.4.380.3570.03718.93
5.4.370.4530.04019.21
5.4.360.4370.04019.24
5.4.350.4530.04019.15
5.4.340.3870.03319.21
5.4.320.3500.04319.19
5.4.310.4430.03719.24
5.4.300.3930.03319.22
5.4.290.3770.03719.14
5.4.280.3870.03719.24
5.4.270.4070.03719.14
5.4.260.3600.03019.23
5.4.250.0070.04319.12
5.4.240.0130.06719.14
5.4.230.4470.04319.02
5.4.220.4230.04019.20
5.4.210.4600.03319.14
5.4.200.4500.04018.94
5.4.190.4470.03719.21
5.4.180.3570.03719.05
5.4.170.3630.04019.20
5.4.160.0930.04018.94
5.4.150.0000.04018.95
5.4.140.3770.03716.34
5.4.130.3570.03316.51
5.4.120.3530.04016.36
5.4.110.3700.03016.53
5.4.100.3570.03316.53
5.4.90.3800.03016.54
5.4.80.3900.04016.46
5.4.70.4470.03316.24
5.4.60.4200.03316.61
5.4.50.3900.03716.42
5.4.40.3770.03016.20
5.4.30.3900.04716.48
5.4.20.3800.03316.46
5.4.10.4330.04016.32
5.4.00.4070.03315.79
5.3.290.3830.04014.67
5.3.280.3400.03314.60
5.3.270.3630.03314.63
5.3.260.3670.03014.75
5.3.250.0030.04314.65
5.3.240.0670.03314.66
5.3.230.3570.04314.61
5.3.220.3870.03714.62
5.3.210.3630.03714.63
5.3.200.3630.04014.64
5.3.190.3530.04314.62
5.3.180.4170.03314.60
5.3.170.4530.04014.64
5.3.160.3670.02714.57
5.3.150.3870.05714.56
5.3.140.3630.03314.57
5.3.130.3870.03714.48
5.3.120.3700.03714.44
5.3.110.3930.03714.44
5.3.100.3670.04314.07
5.3.90.3500.04014.10
5.3.80.3730.04013.94
5.3.70.3830.03713.94
5.3.60.3800.03014.03
5.3.50.3930.03013.99
5.3.40.3800.03713.96
5.3.30.3800.03713.91
5.3.20.4230.03013.76
5.3.10.4530.03313.81
5.3.00.4500.03713.65
5.2.170.3100.03311.16
5.2.160.3230.02311.16
5.2.150.3270.03311.32
5.2.140.3500.03711.05
5.2.130.3970.02711.11
5.2.120.3330.03011.08
5.2.110.3870.03011.12
5.2.100.3670.03311.27
5.2.90.3330.03011.17
5.2.80.3030.02711.05
5.2.70.2700.02711.10
5.2.60.3800.03311.06
5.2.50.4570.03311.05
5.2.40.3130.03011.16
5.2.30.2900.03710.87
5.2.20.3100.03710.95
5.2.10.3270.02710.92
5.2.00.3230.02310.80
5.1.60.3070.03310.05
5.1.50.3100.0279.95
5.1.40.2870.02310.13
5.1.30.3070.02710.27
5.1.20.3230.03710.33
5.1.10.3170.03010.07
5.1.00.3130.03010.09
5.0.50.1570.0238.63
5.0.40.1670.0208.42
5.0.30.1430.0308.21
5.0.20.1400.0178.25
5.0.10.1470.0208.24
5.0.00.1370.0378.19
4.4.90.1500.0136.56
4.4.80.1570.0206.56
4.4.70.1930.0176.56
4.4.60.1600.0176.56
4.4.50.1570.0136.56
4.4.40.1770.0236.56
4.4.30.1600.0206.56
4.4.20.1700.0176.56
4.4.10.1770.0176.56
4.4.00.1800.0236.56
4.3.110.1700.0136.56
4.3.100.1430.0176.56
4.3.90.1600.0176.56
4.3.80.1670.0276.57
4.3.70.1500.0176.58
4.3.60.1400.0176.58
4.3.50.1600.0106.58
4.3.40.1770.0276.58
4.3.30.0930.0206.59
4.3.20.0930.0206.59
4.3.10.0900.0136.59
4.3.00.0870.0206.59

preferences:
41.23 ms | 401 KiB | 5 Q