3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Thing { private $name; private $age; public function setName($name) { $this->name = $name; return $this; } public function setAge($age) { $this->age = $age; return $this; } } $thing = new Thing(); $thing->setName('Matt'); $thing->setAge(23); $thing = (array)$thing; echo $thing['name'];

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.0110.00416.88
8.3.50.0170.00521.89
8.3.40.0070.00718.81
8.3.30.0100.00319.04
8.3.20.0000.00720.19
8.3.10.0040.00421.95
8.3.00.0080.00017.93
8.2.180.0140.00016.50
8.2.170.0090.01222.96
8.2.160.0070.00721.22
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0120.00626.16
8.2.120.0000.00820.68
8.2.110.0040.00722.20
8.2.100.0100.00319.76
8.2.90.0050.00319.34
8.2.80.0030.00617.97
8.2.70.0030.00617.63
8.2.60.0050.00317.93
8.2.50.0000.00818.07
8.2.40.0060.00318.16
8.2.30.0000.00818.02
8.2.20.0030.00517.81
8.2.10.0000.00817.96
8.2.00.0030.00617.64
8.1.280.0090.00625.92
8.1.270.0040.00422.20
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0100.00023.74
8.1.230.0110.00018.97
8.1.220.0000.00917.79
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0000.00917.53
8.1.180.0040.00418.57
8.1.170.0040.00418.48
8.1.160.0030.00522.13
8.1.150.0040.00418.88
8.1.140.0000.00817.31
8.1.130.0000.00717.82
8.1.120.0030.00317.37
8.1.110.0000.00817.42
8.1.100.0030.00317.35
8.1.90.0000.00717.45
8.1.80.0000.00717.31
8.1.70.0000.00717.43
8.1.60.0030.00717.59
8.1.50.0050.00317.54
8.1.40.0040.00417.39
8.1.30.0000.00817.55
8.1.20.0050.00317.63
8.1.10.0040.00417.49
8.1.00.0060.00317.47
8.0.300.0000.00718.77
8.0.290.0040.00417.30
8.0.280.0070.00018.40
8.0.270.0040.00317.27
8.0.260.0040.00417.29
8.0.250.0030.00316.93
8.0.240.0030.00516.82
8.0.230.0000.00616.82
8.0.220.0070.00016.91
8.0.210.0040.00416.82
8.0.200.0030.00316.90
8.0.190.0040.00816.94
8.0.180.0060.00316.90
8.0.170.0000.00716.81
8.0.160.0040.00416.90
8.0.150.0040.00416.83
8.0.140.0020.00516.82
8.0.130.0030.00313.34
8.0.120.0040.00416.79
8.0.110.0040.00416.93
8.0.100.0000.00716.90
8.0.90.0000.00816.68
8.0.80.0070.00716.91
8.0.70.0040.00416.95
8.0.60.0040.00416.93
8.0.50.0000.00716.75
8.0.30.0100.01017.11
8.0.20.0090.00917.40
8.0.10.0000.00716.95
8.0.00.0110.00716.67
7.4.330.0050.00015.14
7.4.320.0000.00716.64
7.4.300.0060.00016.44
7.4.290.0040.00716.60
7.4.280.0080.00016.61
7.4.270.0000.01016.50
7.4.260.0050.00316.46
7.4.250.0070.00016.40
7.4.240.0000.00816.51
7.4.230.0030.00416.53
7.4.220.0070.01116.65
7.4.210.0070.01316.46
7.4.200.0000.00816.60
7.4.160.0060.01016.63
7.4.150.0090.00817.40
7.4.140.0090.00917.86
7.4.130.0110.00716.48
7.4.120.0120.00616.55
7.4.110.0030.01616.58
7.4.100.0100.01016.71
7.4.90.0090.00916.49
7.4.80.0140.00719.39
7.4.70.0120.01216.71
7.4.60.0090.00916.62
7.4.50.0040.00416.27
7.4.40.0040.01116.70
7.4.30.0110.00716.64
7.4.00.0040.00915.05
7.3.330.0050.00013.38
7.3.320.0000.00513.39
7.3.310.0030.00316.25
7.3.300.0060.00016.24
7.3.290.0090.00716.27
7.3.280.0110.00816.34
7.3.270.0120.00417.40
7.3.260.0060.01016.54
7.3.250.0040.01516.47
7.3.240.0120.00316.50
7.3.230.0140.00316.50
7.3.210.0120.00616.59
7.3.200.0200.00319.39
7.3.190.0070.01016.44
7.3.180.0150.00016.52
7.3.170.0130.00316.46
7.3.160.0100.00716.43
7.2.330.0060.01316.60
7.2.320.0110.00616.70
7.2.310.0030.01516.64
7.2.300.0070.01016.44
7.2.290.0150.00316.57
7.2.60.0130.00016.99
7.1.200.0110.00015.82
7.1.70.0000.01117.28
7.1.60.0130.01019.29
7.1.50.0130.02216.96
7.1.00.0030.07722.36
7.0.200.0030.00316.93
7.0.140.0000.07722.05
7.0.60.0030.08319.94
7.0.50.0070.08317.87
7.0.40.0070.08720.27
7.0.30.0570.05020.16
7.0.20.0300.05320.06
7.0.10.0130.04720.24
7.0.00.0100.08320.32
5.6.280.0030.06721.11
5.6.210.0100.07720.63
5.6.200.0070.03718.16
5.6.190.0030.04320.33
5.6.180.0000.09020.49
5.6.170.0230.03720.48
5.6.160.0070.04020.54
5.6.150.0030.07318.18
5.6.140.0030.08318.17
5.6.130.0030.04718.11
5.6.120.0170.07720.99
5.6.110.0030.04721.09
5.6.100.0030.08721.19
5.6.90.0030.04020.98
5.6.80.0130.03320.37
5.5.350.0000.08320.42
5.5.340.0000.05018.08
5.5.330.0070.05020.42
5.5.320.0270.04320.40
5.5.310.0230.07320.26
5.5.300.0030.04318.10
5.5.290.0070.05717.93
5.5.280.0070.04320.85
5.5.270.0030.08020.80
5.5.260.0100.07020.89
5.5.250.0070.04020.58
5.5.240.0030.08320.07
5.4.450.0330.08719.34
5.4.440.0800.06719.55
5.4.430.0130.05019.36
5.4.420.0070.07019.52
5.4.410.0100.05319.31
5.4.400.0070.05719.33
5.4.390.0030.07019.07
5.4.380.0270.04718.86
5.4.370.0230.05718.76
5.4.360.0230.05018.72
5.4.350.0130.03313.73
5.4.340.0170.03713.85
5.4.320.0030.04314.25
5.4.310.0130.03714.21
5.4.300.0170.03014.20
5.4.290.0130.04014.21
5.4.280.0070.04014.13
5.4.270.0070.04014.11
5.4.260.0100.04314.13
5.4.250.0130.03714.14
5.4.240.0130.04714.09
5.4.230.0030.04314.10
5.4.220.0000.04314.30
5.4.210.0130.03314.09
5.4.200.0200.03314.15
5.4.190.0100.05314.12
5.4.180.0200.04714.13
5.4.170.0200.05014.22
5.4.160.0100.04314.30
5.4.150.0070.04014.10
5.4.140.0000.04713.71
5.4.130.0000.05013.82
5.4.120.0070.04013.75
5.4.110.0070.04013.73
5.4.100.0030.04313.77
5.4.90.0070.03713.72
5.4.80.0030.04013.84
5.4.70.0070.03713.74
5.4.60.0100.03713.70
5.4.50.0200.03713.83
5.4.40.0130.03713.75
5.4.30.0130.03713.93
5.4.20.0130.03713.64
5.4.10.0070.04313.72
5.4.00.0100.04013.30
5.3.290.0100.04714.71
5.3.280.0030.04714.73
5.3.270.0100.03714.64
5.3.260.0000.04314.52
5.3.250.0000.04314.74
5.3.240.0000.04314.59
5.3.230.0100.03714.54
5.3.220.0070.03714.68
5.3.210.0030.04014.71
5.3.200.0100.04314.61
5.3.190.0030.04314.63
5.3.180.0130.02714.50
5.3.170.0130.03714.44
5.3.160.0000.04314.61
5.3.150.0100.03714.45
5.3.140.0030.04714.46
5.3.130.0030.04014.61
5.3.120.0030.04314.65
5.3.110.0100.04314.69
5.3.100.0170.03713.93
5.3.90.0130.03713.99
5.3.80.0030.04013.91
5.3.70.0000.04314.07
5.3.60.0030.04013.89
5.3.50.0030.04314.08
5.3.40.0100.04014.08
5.3.30.0100.03313.95
5.3.20.0070.03713.75
5.3.10.0070.03713.58
5.3.00.0070.05013.71
5.2.170.0100.04011.28
5.2.160.0070.02711.18
5.2.150.0070.03011.09
5.2.140.0130.02311.20
5.2.130.0070.03311.14
5.2.120.0030.04311.17
5.2.110.0030.03011.04
5.2.100.0070.03011.02
5.2.90.0030.03311.21
5.2.80.0130.02311.19
5.2.70.0070.03711.08
5.2.60.0030.03310.93
5.2.50.0070.03311.12
5.2.40.0000.03711.09
5.2.30.0100.03011.07
5.2.20.0100.02711.02
5.2.10.0030.03010.81
5.2.00.0070.03010.75
5.1.60.0030.02710.06
5.1.50.0100.0239.91
5.1.40.0030.0279.95
5.1.30.0100.02310.27
5.1.20.0170.02710.23
5.1.10.0070.03310.16
5.1.00.0030.02710.03
5.0.50.0070.0208.45
5.0.40.0000.0278.33
5.0.30.0000.0338.15
5.0.20.0030.0278.34
5.0.10.0070.0238.07
5.0.00.0000.0438.14
4.4.90.0030.0235.96
4.4.80.0070.0135.82
4.4.70.0000.0235.96
4.4.60.0000.0205.82
4.4.50.0030.0175.90
4.4.40.0030.0275.84
4.4.30.0030.0205.82
4.4.20.0000.0205.95
4.4.10.0000.0205.96
4.4.00.0030.0275.86
4.3.110.0000.0175.79
4.3.100.0000.0205.83
4.3.90.0100.0105.71
4.3.80.0000.0275.71
4.3.70.0070.0135.79
4.3.60.0030.0175.74
4.3.50.0000.0235.78
4.3.40.0030.0235.71
4.3.30.0000.0174.51
4.3.20.0030.0174.60
4.3.10.0030.0134.52
4.3.00.0100.0236.68

preferences:
60.48 ms | 401 KiB | 5 Q