3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Game */ final class Game { protected $start; protected $rounds; /** * @param int $start * @param int $rounds */ public function __construct($start = 1, $rounds = 100) { $this->start = $start; $this->rounds = $rounds; } /** * @param string $propertyName * * @return mixed * @throws \InvalidArgumentException */ public function __get($propertyName) { if (property_exists($this, $propertyName)) { return $this->$propertyName; } throw new \InvalidArgumentException('The property '.$propertyName.' does not exists in '.get_class($this)); } } $game = new Game(); echo $game->start.'/'.$game->rounds;

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.00718.31
8.3.50.0050.01421.14
8.3.40.0150.00318.71
8.3.30.0110.00419.08
8.3.20.0080.00020.20
8.3.10.0000.00821.96
8.3.00.0040.00422.58
8.2.180.0140.00716.88
8.2.170.0070.00722.96
8.2.160.0070.00719.03
8.2.150.0000.00724.18
8.2.140.0000.00824.66
8.2.130.0110.00726.16
8.2.120.0040.00419.38
8.2.110.0000.01019.30
8.2.100.0080.00417.71
8.2.90.0030.00519.05
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0000.00818.03
8.2.50.0030.00518.07
8.2.40.0040.00418.09
8.2.30.0080.00018.00
8.2.20.0040.00417.64
8.2.10.0000.00817.66
8.2.00.0070.00417.71
8.1.280.0090.00625.92
8.1.270.0030.00622.16
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00321.43
8.1.230.0040.00717.52
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0000.01217.48
8.1.190.0080.00017.23
8.1.180.0050.00318.79
8.1.170.0000.01018.43
8.1.160.0000.00722.16
8.1.150.0020.00518.77
8.1.140.0040.00417.52
8.1.130.0000.00717.85
8.1.120.0040.00417.49
8.1.110.0060.00317.50
8.1.100.0070.00017.51
8.1.90.0000.00717.47
8.1.80.0000.00717.54
8.1.70.0000.00817.48
8.1.60.0030.00517.68
8.1.50.0060.00317.46
8.1.40.0000.00817.56
8.1.30.0040.00417.67
8.1.20.0000.00817.66
8.1.10.0050.00317.50
8.1.00.0040.00417.61
8.0.300.0040.00418.77
8.0.290.0060.00316.63
8.0.280.0040.00418.34
8.0.270.0030.00317.34
8.0.260.0000.00816.79
8.0.250.0000.00716.87
8.0.240.0030.00616.95
8.0.230.0050.00316.88
8.0.220.0030.00316.96
8.0.210.0000.00716.95
8.0.200.0000.00716.96
8.0.190.0080.00016.91
8.0.180.0050.00217.01
8.0.170.0050.00316.97
8.0.160.0000.00716.90
8.0.150.0040.00416.91
8.0.140.0000.00916.80
8.0.130.0000.00513.32
8.0.120.0030.00516.83
8.0.110.0040.00416.81
8.0.100.0000.00716.79
8.0.90.0040.00416.95
8.0.80.0030.01216.90
8.0.70.0000.00716.98
8.0.60.0000.00716.95
8.0.50.0040.00416.98
8.0.30.0090.01117.19
8.0.20.0050.01317.40
8.0.10.0070.00016.99
8.0.00.0140.00716.81
7.4.330.0000.00515.00
7.4.320.0000.00616.52
7.4.300.0060.00016.65
7.4.290.0000.00716.61
7.4.280.0020.00516.52
7.4.270.0020.00516.52
7.4.260.0040.00416.68
7.4.250.0000.00816.51
7.4.240.0030.00316.59
7.4.230.0030.00316.62
7.4.220.0060.01316.50
7.4.210.0050.01016.54
7.4.200.0030.00316.53
7.4.190.0030.00316.79
7.4.160.0090.00616.47
7.4.150.0030.01517.40
7.4.140.0140.00717.86
7.4.130.0100.00716.59
7.4.120.0030.01416.57
7.4.110.0030.01416.57
7.4.100.0030.01416.62
7.4.90.0100.00616.56
7.4.80.0100.01319.39
7.4.70.0110.00516.39
7.4.60.0070.01116.39
7.4.50.0050.00316.42
7.4.40.0070.00722.77
7.4.30.0000.01516.48
7.4.00.0090.00314.85
7.3.330.0050.00013.24
7.3.320.0030.00313.33
7.3.310.0000.00716.41
7.3.300.0020.00516.25
7.3.290.0090.00616.33
7.3.280.0120.00416.33
7.3.270.0070.01117.40
7.3.260.0070.01116.57
7.3.250.0060.01116.38
7.3.240.0120.00416.45
7.3.230.0060.01016.60
7.3.210.0150.00816.45
7.3.200.0120.00619.39
7.3.190.0140.00316.56
7.3.180.0070.01016.27
7.3.170.0090.00616.61
7.3.160.0060.01016.46
7.3.120.0040.01114.61
7.2.330.0060.01016.48
7.2.320.0100.01316.50
7.2.310.0140.00216.83
7.2.300.0130.00316.76
7.2.290.0060.01216.59
7.2.00.0060.00919.56
7.1.200.0080.00415.81
7.1.100.0100.00318.15
7.1.70.0030.00317.35
7.1.60.0120.01219.82
7.1.50.0030.01517.05
7.1.00.0000.06022.45
7.0.200.0040.00716.67
7.0.140.0100.06721.94
7.0.60.0070.08720.04
7.0.50.0070.08017.95
7.0.40.0030.09020.26
7.0.30.0500.04720.06
7.0.20.0330.06320.24
7.0.10.0230.08320.16
7.0.00.0200.02720.18
5.6.280.0070.06720.79
5.6.210.0200.06320.67
5.6.200.0100.08018.22
5.6.190.0070.04720.45
5.6.180.0270.07720.47
5.6.170.0230.05020.45
5.6.160.0300.03320.55
5.6.150.0100.06318.21
5.6.140.0100.04318.23
5.6.130.0170.07718.21
5.6.120.0000.09321.13
5.6.110.0200.08021.03
5.6.100.0130.07020.96
5.6.90.0170.06720.97
5.6.80.0100.07320.38
5.6.70.3970.04320.53
5.5.350.0100.07320.34
5.5.340.0000.04717.98
5.5.330.0000.04320.35
5.5.320.0300.04720.36
5.5.310.0300.04720.19
5.5.300.0000.08718.04
5.5.290.0070.08317.99
5.5.280.0030.04320.88
5.5.270.0130.06720.84
5.5.260.0130.07720.77
5.5.250.0070.05020.59
5.5.240.0030.07720.38
5.4.450.0770.05319.55
5.4.440.0700.05719.47
5.4.430.0730.04719.16
5.4.420.0730.04719.48
5.4.410.0070.05719.58
5.4.400.0130.07319.42
5.4.390.0200.05319.15
5.4.380.0300.04718.78
5.4.370.0270.04018.48
5.4.360.0230.03318.50
5.4.350.0120.03912.03
5.4.340.0070.04112.02
5.4.320.0030.04412.50
5.4.310.0040.04512.50
5.4.300.0050.04112.51
5.4.290.0050.04712.50
5.4.280.0060.03512.40
5.4.270.0100.04012.40
5.4.260.0030.06718.99
5.4.250.0000.06018.96
5.4.240.0070.05318.83
5.4.230.0170.04719.09
5.4.220.0100.05018.65
5.4.210.0030.07018.96
5.4.200.0000.05718.93
5.4.190.0070.08019.00
5.4.180.0170.07018.80
5.4.170.0200.04018.83
5.4.160.0130.05019.01
5.4.150.0170.04318.78
5.4.140.0070.05316.40
5.4.130.0070.05016.39
5.4.120.0130.05016.51
5.4.110.0030.05316.53
5.4.100.0070.05316.65
5.4.90.0070.04716.53
5.4.80.0070.04716.39
5.4.70.0100.07316.31
5.4.60.0030.05716.46
5.4.50.0300.05316.59
5.4.40.0070.05716.39
5.4.30.0130.04016.36
5.4.20.0130.04016.62
5.4.10.0000.06016.33
5.4.00.0030.05015.86
5.3.290.0110.04212.80
5.3.280.0070.05714.82
5.3.270.0100.07714.77
5.3.260.0100.05314.61
5.3.250.0070.06714.65
5.3.240.0070.05714.61
5.3.230.0130.04714.59
5.3.220.0070.05714.66
5.3.210.0100.06014.57
5.3.200.0130.04314.54
5.3.190.0130.05014.42
5.3.180.0100.07014.73
5.3.170.0200.04014.63
5.3.160.0170.05714.65
5.3.150.0000.05714.47
5.3.140.0100.06714.74
5.3.130.0030.06014.54
5.3.120.0130.07714.64
5.3.110.0070.05314.57
5.3.100.0070.07013.95
5.3.90.0030.07013.93
5.3.80.0070.04714.01
5.3.70.0030.06014.01
5.3.60.0070.05013.84
5.3.50.0030.05313.94
5.3.40.0030.07713.94
5.3.30.0100.04313.98
5.3.20.0030.06013.80
5.3.10.0000.06013.64
5.3.00.0200.04713.71
5.2.170.0000.04711.38
5.2.160.0100.04011.15
5.2.150.0070.04011.13
5.2.140.0100.05711.21
5.2.130.0070.04311.09
5.2.120.0070.03711.08
5.2.110.0100.03311.11
5.2.100.0030.04011.19
5.2.90.0130.08311.06
5.2.80.0070.04311.17
5.2.70.0130.03311.18
5.2.60.0130.04710.97
5.2.50.0130.05011.11
5.2.40.0100.03710.91
5.2.30.0070.04311.16
5.2.20.0030.05310.82
5.2.10.0100.04710.95
5.2.00.0030.04310.81
5.1.60.0030.03310.24
5.1.50.0100.0309.93
5.1.40.0030.0509.98
5.1.30.0100.03010.16
5.1.20.0070.05710.44
5.1.10.0030.03710.18
5.1.00.0100.03310.15
5.0.50.0000.0338.79
5.0.40.0070.0238.48
5.0.30.0000.0608.30
5.0.20.0030.0338.15
5.0.10.0000.0308.33
5.0.00.0000.0538.21
4.4.90.0030.0307.52
4.4.80.0000.0307.52
4.4.70.0030.0277.52
4.4.60.0100.0137.52
4.4.50.0000.0337.52
4.4.40.0100.0277.48
4.4.30.0000.0237.48
4.4.20.0070.0177.48
4.4.10.0070.0307.48
4.4.00.0030.0377.48
4.3.110.0070.0277.48
4.3.100.0070.0277.48
4.3.90.0000.0237.48
4.3.80.0030.0307.48
4.3.70.0000.0337.48
4.3.60.0000.0237.48
4.3.50.0070.0207.48
4.3.40.0100.0407.48
4.3.30.0000.0237.48
4.3.20.0000.0237.48
4.3.10.0000.0277.48
4.3.00.0130.0277.02

preferences:
39.3 ms | 401 KiB | 5 Q