3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public $name; public function setName($name) { $this->name = $name; } } class Student extends Person { public static function showName() { echo $this->name; } } $person = new Person(); $person->setName("Daan"); $student = new Student(); $student->setName('Daan'); $student->showName();

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.0000.01516.63
8.3.50.0110.00916.53
8.3.40.0000.01518.98
8.3.30.0150.00618.80
8.3.20.0080.00018.89
8.3.10.0080.00020.48
8.3.00.0030.00619.50
8.2.180.0140.00716.75
8.2.170.0100.00722.96
8.2.160.0100.00321.06
8.2.150.0000.00824.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0080.00019.83
8.2.110.0100.00021.06
8.2.100.0090.00317.91
8.2.90.0030.00719.34
8.2.80.0040.00419.47
8.2.70.0040.00417.63
8.2.60.0080.00017.91
8.2.50.0040.00718.07
8.2.40.0040.00417.91
8.2.30.0060.00317.94
8.2.20.0000.00817.65
8.2.10.0060.00317.69
8.2.00.0060.00317.68
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00422.30
8.1.230.0090.00320.89
8.1.220.0000.00817.74
8.1.210.0040.00418.96
8.1.200.0040.00417.25
8.1.190.0040.00417.53
8.1.180.0030.00518.10
8.1.170.0000.00820.54
8.1.160.0050.00218.91
8.1.150.0070.00018.50
8.1.140.0040.00417.40
8.1.130.0050.00317.84
8.1.120.0040.00417.46
8.1.110.0040.00417.44
8.1.100.0070.00017.32
8.1.90.0080.00017.41
8.1.80.0000.00717.43
8.1.70.0000.00717.38
8.1.60.0070.00017.66
8.1.50.0030.00517.54
8.1.40.0040.00417.44
8.1.30.0040.00417.56
8.1.20.0040.00417.69
8.1.10.0000.00717.57
8.1.00.0060.00317.52
8.0.300.0000.00819.91
8.0.290.0070.00016.75
8.0.280.0030.00318.28
8.0.270.0030.00317.12
8.0.260.0040.00416.83
8.0.250.0040.00416.87
8.0.240.0000.00816.95
8.0.230.0000.00716.95
8.0.220.0000.00716.91
8.0.210.0030.00316.77
8.0.200.0000.00816.84
8.0.190.0080.00016.84
8.0.180.0080.00016.79
8.0.170.0050.00316.95
8.0.160.0040.00417.01
8.0.150.0040.00416.83
8.0.140.0030.00416.90
8.0.130.0000.00613.35
8.0.120.0030.00516.86
8.0.110.0000.00816.94
8.0.100.0080.00017.02
8.0.90.0070.00016.78
8.0.80.0040.01116.86
8.0.70.0040.00416.80
8.0.60.0000.00716.79
8.0.50.0080.00016.71
8.0.30.0140.00717.26
8.0.20.0130.00816.99
8.0.10.0040.00416.97
8.0.00.0080.00916.90
7.4.330.0000.00512.92
7.4.320.0040.00416.53
7.4.300.0060.00016.42
7.4.290.0040.00416.62
7.4.280.0000.00916.45
7.4.270.0040.00416.45
7.4.260.0000.00613.20
7.4.250.0000.00816.55
7.4.240.0000.00816.61
7.4.230.0040.00416.42
7.4.220.0150.00316.39
7.4.210.0070.00816.65
7.4.200.0030.00316.50
7.4.190.0070.00016.33
7.4.160.0060.01416.52
7.4.150.0070.01116.34
7.4.140.0080.01016.52
7.4.130.0070.01016.53
7.4.120.0110.00616.38
7.4.110.0110.00716.51
7.4.100.0060.01016.68
7.4.90.0090.00916.46
7.4.80.0150.00316.70
7.4.70.0060.01216.46
7.4.60.0040.01416.50
7.4.50.0080.00016.57
7.4.40.0030.00916.48
7.4.30.0060.01016.36
7.4.00.0070.01015.03
7.3.330.0000.00713.36
7.3.320.0030.00313.13
7.3.310.0050.00216.22
7.3.300.0000.00716.41
7.3.290.0060.00916.39
7.3.280.0100.00716.34
7.3.270.0150.00916.35
7.3.260.0100.00716.56
7.3.250.0080.00916.37
7.3.240.0100.00716.36
7.3.230.0130.00316.38
7.3.210.0140.00316.30
7.3.200.0150.00419.39
7.3.190.0160.00316.41
7.3.180.0060.00916.49
7.3.170.0100.00516.39
7.3.160.0000.01616.64
7.3.120.0030.01014.72
7.2.330.0120.00616.64
7.2.320.0090.00916.60
7.2.310.0120.00616.75
7.2.300.0150.00316.74
7.2.290.0080.00816.77
7.2.60.0090.00616.95
7.2.00.0850.01417.41
7.1.200.0030.01015.79
7.1.100.0140.00317.53
7.1.70.0040.00816.74
7.1.60.0060.01819.40
7.1.50.0060.01616.89
7.1.00.0030.06322.34
7.0.200.0080.00416.81
7.0.140.0000.07721.92
7.0.120.0070.07022.04
7.0.60.0130.08020.05
7.0.50.0070.08017.86
7.0.40.0130.06717.81
7.0.30.0070.05017.82
7.0.20.0070.04017.86
7.0.10.0070.04317.68
7.0.00.0100.04017.75
5.6.280.0070.07020.92
5.6.210.0030.06020.68
5.6.200.0100.08018.25
5.6.190.0000.08718.27
5.6.180.0070.04018.14
5.6.170.0100.03718.28
5.6.160.0130.04018.29
5.6.150.0070.07018.29
5.6.140.0170.07018.16
5.6.130.0070.06318.12
5.6.120.0030.07018.15
5.6.110.0000.05018.15
5.6.100.0000.06718.14
5.6.90.0100.07718.13
5.6.80.0030.06717.54
5.6.70.0100.05717.63
5.6.60.0070.07717.62
5.6.50.0000.06317.56
5.6.40.0100.07317.57
5.6.30.0130.03017.52
5.6.20.0100.04017.47
5.6.10.0070.04317.54
5.6.00.0030.07717.53
5.5.350.0070.05320.50
5.5.340.0130.08017.96
5.5.330.0130.07017.99
5.5.320.0030.04017.93
5.5.310.0100.03317.95
5.5.300.0130.06018.01
5.5.290.0070.08318.01
5.5.280.0070.08017.95
5.5.270.0070.08017.96
5.5.260.0070.07017.90
5.5.250.0070.04717.86
5.5.240.0100.04717.35
5.5.230.0000.04317.37
5.5.220.0000.04317.36
5.5.210.0170.03717.39
5.5.200.0070.04317.34
5.5.190.0100.07717.34
5.5.180.0030.08017.44
5.5.160.0100.03717.39
5.5.150.0030.05717.39
5.5.140.0130.07017.34
5.5.130.0100.07017.30
5.5.120.0100.05717.30
5.5.110.0070.08317.27
5.5.100.0100.07317.32
5.5.90.0100.07317.33
5.5.80.0130.07017.23
5.5.70.0100.07717.32
5.5.60.0170.07017.19
5.5.50.0100.04317.22
5.5.40.0030.06717.29
5.5.30.0070.05717.21
5.5.20.0030.07717.18
5.5.10.0100.04017.31
5.5.00.0100.07317.25
5.4.450.0070.06019.60
5.4.440.0100.04719.35
5.4.430.0170.06719.45
5.4.420.0070.07319.38
5.4.410.0130.06719.08
5.4.400.0000.05319.01
5.4.390.0030.05019.09
5.4.380.0070.03319.14
5.4.370.0070.07718.88
5.4.360.0130.05719.11
5.4.350.0030.04019.04
5.4.340.0130.07019.17
5.4.320.0100.07718.98
5.4.310.0070.07719.09
5.4.300.0100.07719.11
5.4.290.0100.06319.27
5.4.280.0070.07719.13
5.4.270.0100.07319.03
5.4.260.0130.06019.27
5.4.250.0030.08319.04
5.4.240.0070.07019.11
5.4.230.0100.07319.12
5.4.220.0030.06719.02
5.4.210.0100.07319.01
5.4.200.0070.06018.88
5.4.190.0000.05319.00
5.4.180.0100.07319.09
5.4.170.0100.06719.04
5.4.160.0100.07019.29
5.4.150.0070.03719.12
5.4.140.0000.07016.46
5.4.130.0100.06716.47
5.4.120.0100.04016.35
5.4.110.0000.04016.36
5.4.100.0000.04316.54
5.4.90.0100.06716.54
5.4.80.0100.04316.45
5.4.70.0070.03716.68
5.4.60.0100.07716.40
5.4.50.0070.05016.38
5.4.40.0100.03716.50
5.4.30.0000.05316.35
5.4.20.0000.04016.38
5.4.10.0030.05016.35
5.4.00.0170.06316.02
5.3.290.0170.05014.73
5.3.280.0030.05714.66
5.3.270.0070.07714.64
5.3.260.0070.04314.64
5.3.250.0030.03714.61
5.3.240.0070.07314.62
5.3.230.0100.07314.59
5.3.220.0100.05014.55
5.3.210.0100.03714.61
5.3.200.0030.04314.53
5.3.190.0130.06314.53
5.3.180.0030.07714.41
5.3.170.0030.06314.78
5.3.160.0130.06314.60
5.3.150.0100.07314.59
5.3.140.0000.08014.52
5.3.130.0100.06014.60
5.3.120.0030.04314.51
5.3.110.0030.06014.61
5.3.100.0030.04014.14
5.3.90.0070.04314.01
5.3.80.0000.05014.04
5.3.70.0000.04314.05
5.3.60.0130.06713.90
5.3.50.0070.07313.84
5.3.40.0070.06014.00
5.3.30.0070.06713.93
5.3.20.0070.04713.74
5.3.10.0100.02713.67
5.3.00.0130.06713.64
5.2.170.0030.06011.14
5.2.160.0000.03311.15
5.2.150.0000.06711.12
5.2.140.0070.04011.19
5.2.130.0030.03011.01
5.2.120.0000.03010.96
5.2.110.0070.05311.17
5.2.100.0100.03311.00
5.2.90.0030.04311.16
5.2.80.0000.04711.09
5.2.70.0100.02711.09
5.2.60.0100.06011.04
5.2.50.0030.04011.07
5.2.40.0070.05310.85
5.2.30.0070.06011.00
5.2.20.0130.05310.86
5.2.10.0000.04010.83
5.2.00.0030.03010.77
5.1.60.0000.03310.05
5.1.50.0100.01710.05
5.1.40.0070.02010.04
5.1.30.0000.03310.55
5.1.20.0030.06010.36
5.1.10.0100.04710.14
5.1.00.0000.06010.05
5.0.50.0000.0508.60
5.0.40.0070.0438.60
5.0.30.0000.0508.60
5.0.20.0070.0408.60
5.0.10.0030.0178.60
5.0.00.0100.0578.60
4.4.90.0070.0338.60
4.4.80.0000.0278.60
4.4.70.0000.0178.60
4.4.60.0100.0308.60
4.4.50.0000.0278.60
4.4.40.0000.0278.60
4.4.30.0070.0108.60
4.4.20.0000.0408.60
4.4.10.0070.0338.60
4.4.00.0070.0378.60
4.3.110.0000.0338.60
4.3.100.0070.0308.60
4.3.90.0030.0178.60
4.3.80.0030.0308.60
4.3.70.0000.0208.60
4.3.60.0030.0338.60
4.3.50.0000.0238.60
4.3.40.0070.0308.60
4.3.30.0000.0238.60
4.3.20.0000.0208.60
4.3.10.0000.0178.60
4.3.00.0070.0208.60

preferences:
44.29 ms | 400 KiB | 5 Q