3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Server { private $hostname; private $cpu; private $ram; public function __construct($hostname = "", $cpu = "", $ram = 0) { $this->hostname = $hostname; $this->cpu = $cpu; $this->ram = $ram; } public function getHostname() { return $this->hostname; } public function setHostname($hostname) { return $this->hostname = ($hostname === null ? $this->_exception() : $hostname); } protected function _exception($text = null) { throw new InvalidArgumentException($text); } } $server = new Server; $server->setHostname(null);

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.01416.63
8.3.50.0140.01021.93
8.3.40.0120.00918.67
8.3.30.0070.00718.83
8.3.20.0040.00420.29
8.3.10.0000.00823.51
8.3.00.0040.00419.66
8.2.180.0140.00418.27
8.2.170.0070.00722.96
8.2.160.0030.01020.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00419.29
8.2.120.0080.00026.35
8.2.110.0100.00720.42
8.2.100.0070.00417.80
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0060.00317.50
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0030.00622.33
8.2.30.0030.00620.66
8.2.20.0000.00717.69
8.2.10.0000.00818.01
8.2.00.0060.00318.06
8.1.280.0150.00025.92
8.1.270.0100.00720.20
8.1.260.0030.00628.09
8.1.250.0040.00428.09
8.1.240.0060.00323.98
8.1.230.0110.00017.60
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0120.00017.35
8.1.190.0040.00417.38
8.1.180.0000.00718.10
8.1.170.0060.00318.70
8.1.160.0050.00220.68
8.1.150.0000.00718.97
8.1.140.0050.00319.58
8.1.130.0000.00717.59
8.1.120.0070.00017.46
8.1.110.0000.00717.48
8.1.100.0030.00517.36
8.1.90.0000.00817.40
8.1.80.0030.00517.36
8.1.70.0000.00717.30
8.1.60.0000.00717.48
8.1.50.0060.00317.55
8.1.40.0000.00817.55
8.1.30.0030.00617.63
8.1.20.0000.00817.59
8.1.10.0000.00717.44
8.1.00.0000.00917.40
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.43
8.0.270.0040.00417.11
8.0.260.0030.00317.11
8.0.250.0030.00617.03
8.0.240.0060.00017.00
8.0.230.0000.00816.99
8.0.220.0000.00716.81
8.0.210.0070.00016.90
8.0.200.0000.00716.95
8.0.190.0080.00316.96
8.0.180.0000.00716.75
8.0.170.0030.00516.98
8.0.160.0000.00716.98
8.0.150.0000.00816.86
8.0.140.0070.00016.77
8.0.130.0030.00313.41
8.0.120.0030.00616.94
8.0.110.0040.00417.04
8.0.100.0000.00817.02
8.0.90.0030.00516.80
8.0.80.0080.00916.99
8.0.70.0000.00716.86
8.0.60.0040.00316.91
8.0.50.0040.00416.78
8.0.30.0080.01117.13
8.0.20.0130.00717.40
8.0.10.0060.00317.07
8.0.00.0100.00916.82
7.4.330.0000.00516.74
7.4.320.0030.00316.50
7.4.300.0060.00016.51
7.4.290.0030.00316.42
7.4.280.0040.00416.47
7.4.270.0040.00416.59
7.4.260.0000.01116.54
7.4.250.0040.00416.50
7.4.240.0050.00216.53
7.4.230.0040.00416.50
7.4.220.0140.01016.63
7.4.210.0090.00916.42
7.4.200.0000.00716.31
7.4.160.0090.00616.39
7.4.150.0120.00617.40
7.4.140.0080.01017.86
7.4.130.0090.01016.51
7.4.120.0110.01016.62
7.4.110.0070.01116.73
7.4.100.0060.01816.61
7.4.90.0060.01016.53
7.4.80.0110.00719.39
7.4.70.0090.00916.64
7.4.60.0160.00316.62
7.4.50.0070.01016.64
7.4.40.0070.01016.36
7.4.30.0070.01016.59
7.4.10.0030.01415.00
7.4.00.0080.00714.90
7.3.330.0030.00313.43
7.3.320.0030.00313.41
7.3.310.0000.00716.30
7.3.300.0030.00316.32
7.3.290.0070.01116.43
7.3.280.0120.00516.46
7.3.270.0100.00717.40
7.3.260.0080.00816.33
7.3.250.0090.01016.44
7.3.240.0090.00716.43
7.3.230.0030.01316.39
7.3.210.0080.00816.57
7.3.200.0050.01716.48
7.3.190.0070.01116.40
7.3.180.0090.00916.46
7.3.170.0110.01116.42
7.3.160.0100.00716.29
7.3.130.0070.01114.69
7.3.120.0110.00714.65
7.3.110.0070.01014.91
7.3.100.0030.01014.88
7.3.90.0030.01214.80
7.3.80.0040.00814.80
7.3.70.0030.01014.81
7.3.60.0030.01014.88
7.3.50.0040.00814.67
7.3.40.0040.00814.94
7.3.30.0060.00615.00
7.3.20.0000.01016.88
7.3.10.0070.01116.65
7.3.00.0060.00316.76
7.2.330.0060.01216.71
7.2.320.0140.01116.65
7.2.310.0100.01316.66
7.2.300.0040.01216.68
7.2.290.0110.00616.57
7.2.260.0000.02014.89
7.2.250.0060.00914.99
7.2.240.0060.01214.91
7.2.230.0000.01415.19
7.2.220.0070.01014.93
7.2.210.0060.00615.13
7.2.200.0040.01115.02
7.2.190.0060.00314.79
7.2.180.0030.01015.12
7.2.170.0080.00815.05
7.2.160.0090.00615.12
7.2.150.0130.00616.98
7.2.140.0040.00816.90
7.2.130.0030.01016.82
7.2.120.0040.01217.03
7.2.110.0070.00717.06
7.2.100.0030.01016.86
7.2.90.0000.01417.00
7.2.80.0110.00316.98
7.2.70.0090.00917.00
7.2.60.0070.00616.94
7.2.50.0030.01217.05
7.2.40.0070.00717.05
7.2.30.0030.01316.98
7.2.20.0000.01516.96
7.2.10.0000.01317.06
7.2.00.0150.00617.91
7.1.330.0090.00616.02
7.1.320.0040.00815.59
7.1.310.0030.00915.90
7.1.300.0070.00715.75
7.1.290.0070.00715.73
7.1.280.0100.00715.81
7.1.270.0030.01515.71
7.1.260.0070.00715.52
7.1.250.0070.00715.88
7.1.240.0000.01115.75
7.1.230.0000.01215.92
7.1.220.0030.00915.85
7.1.210.0000.00815.89
7.1.200.0050.00815.81
7.1.190.0100.00315.93
7.1.180.0080.00415.88
7.1.170.0140.00015.91
7.1.160.0070.01015.87
7.1.150.0080.00415.78
7.1.140.0000.01615.86
7.1.130.0030.00615.63
7.1.120.0070.01015.78
7.1.110.0060.01015.95
7.1.100.0040.00717.00
7.1.90.0100.00715.93
7.1.80.0090.00915.68
7.1.70.0040.00916.55
7.1.60.0110.00817.54
7.1.50.0060.00716.48
7.1.40.0060.00315.91
7.1.30.0090.00615.91
7.1.20.0030.00615.91
7.1.10.0030.01015.55
7.1.00.0050.03819.09
7.0.330.0030.00515.43
7.0.320.0000.01115.24
7.0.310.0060.00615.36
7.0.300.0070.00715.49
7.0.290.0110.00315.38
7.0.280.0070.00715.50
7.0.270.0070.01015.51
7.0.260.0090.00615.37
7.0.250.0090.00615.49
7.0.240.0100.00615.31
7.0.230.0000.01415.61
7.0.220.0060.00915.39
7.0.210.0040.01415.50
7.0.200.0820.00414.84
7.0.190.0040.00815.47
7.0.180.0000.01715.57
7.0.170.0070.00415.54
7.0.160.0060.00615.36
7.0.150.0030.00615.37
7.0.140.0040.00415.51
7.0.130.0000.01415.45
7.0.120.0090.00315.66
7.0.110.0000.00915.52
7.0.100.0100.00015.42
7.0.90.0030.00915.25
7.0.80.0070.00715.41
7.0.70.0100.00315.41
7.0.60.0020.04017.61
7.0.50.0030.04816.52
7.0.40.0030.02616.84
7.0.30.0100.04916.87
7.0.20.0150.04416.82
7.0.10.0010.03016.72
7.0.00.0050.03616.90
5.6.400.0000.00914.10
5.6.390.0000.00914.63
5.6.380.0100.00314.04
5.6.370.0060.00314.32
5.6.360.0040.00414.43
5.6.350.0060.01214.18
5.6.340.0000.01314.31
5.6.330.0100.01014.27
5.6.320.0070.01114.24
5.6.310.0120.00014.65
5.6.300.0000.01214.45
5.6.290.0070.00714.56
5.6.280.0070.03817.82
5.6.270.0080.00614.15
5.6.260.0040.00414.29
5.6.250.0000.01414.52
5.6.240.0030.00914.44
5.6.230.0070.00714.46
5.6.220.0040.01114.47
5.6.210.0030.02417.53
5.6.200.0100.03416.23
5.6.190.0070.03017.43
5.6.180.0050.03117.51
5.6.170.0130.05017.49
5.6.160.0070.03017.51
5.6.150.0140.02316.36
5.6.140.0060.03416.51
5.6.130.0070.04216.43
5.6.120.0070.04017.63
5.6.110.0070.02817.77
5.6.100.0060.03717.71
5.6.90.0130.03817.57
5.6.80.0120.03817.37
5.6.70.0110.00414.20
5.6.60.0110.00314.39
5.6.50.0000.01214.26
5.6.40.0070.00714.44
5.6.30.0030.01014.55
5.6.20.0130.00014.59
5.6.10.0070.01014.59
5.6.00.0100.00614.27
5.5.380.0070.00314.11
5.5.370.0110.00414.51
5.5.360.0000.01114.32
5.5.350.0130.04317.09
5.5.340.0020.02416.02
5.5.330.0070.03217.27
5.5.320.0160.02817.25
5.5.310.0100.03217.30
5.5.300.0050.02916.18
5.5.290.0070.04716.01
5.5.280.0090.02917.38
5.5.270.0100.03017.40
5.5.260.0130.03317.57
5.5.250.0080.04217.35
5.5.240.0130.01317.30
5.5.230.0040.01214.52
5.5.220.0100.00314.40
5.5.210.0040.00813.85
5.5.200.0070.00714.34
5.5.190.0120.00313.85
5.5.180.0040.00414.24
5.5.170.0030.01414.24
5.5.160.0000.01314.15
5.5.150.0090.00614.25
5.5.140.0080.00814.18
5.5.130.0030.00614.25
5.5.120.0000.01314.13
5.5.110.0090.00613.91
5.5.100.0000.01614.12
5.5.90.0080.00614.28
5.5.80.0000.01213.93
5.5.70.0030.01014.30
5.5.60.0030.01013.77
5.5.50.0060.00314.25
5.5.40.0070.00714.07
5.5.30.0030.00614.36
5.5.20.0000.01014.08
5.5.10.0000.01014.10
5.5.00.0030.00914.24

preferences:
60 ms | 401 KiB | 5 Q