3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected string $bar; protected string $baz; protected string $qux = 'initial qux'; public function fillValues() { $this->bar = 'bar'; $this->baz = 'baz'; $this->qux = 'qux'; } public function getBar() { return $this->bar; } public function getBaz() { return $this->baz; } public function getQux() { return $this->qux; } } $rc = new ReflectionClass(Foo::class); $foo = $rc->newInstanceWithoutConstructor(); $foo->fillValues(); echo $foo->getBar() . PHP_EOL; echo $foo->getBaz() . PHP_EOL; echo $foo->getQux() . PHP_EOL;

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.0070.01318.56
8.3.50.0140.00716.40
8.3.40.0080.00818.86
8.3.30.0090.00618.68
8.3.20.0070.00021.02
8.3.10.0070.00020.29
8.3.00.0000.00923.65
8.2.180.0140.00725.92
8.2.170.0070.01418.99
8.2.160.0070.00720.36
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00026.16
8.2.110.0060.00321.12
8.2.100.0080.00417.79
8.2.90.0040.00418.16
8.2.80.0090.00019.29
8.2.70.0060.00317.93
8.2.60.0040.00418.09
8.2.50.0060.00318.10
8.2.40.0000.00819.42
8.2.30.0040.00419.15
8.2.20.0100.00018.03
8.2.10.0000.00719.25
8.2.00.0040.00419.08
8.1.280.0150.00325.92
8.1.270.0050.00320.68
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0140.00723.80
8.1.230.0070.00420.99
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0090.00017.48
8.1.190.0040.00417.35
8.1.180.0030.00518.10
8.1.170.0000.00918.46
8.1.160.0070.00418.92
8.1.150.0040.00418.95
8.1.140.0050.00320.87
8.1.130.0000.00720.18
8.1.120.0000.01017.47
8.1.110.0000.00817.40
8.1.100.0070.00017.48
8.1.90.0060.00317.50
8.1.80.0040.00417.37
8.1.70.0070.00017.38
8.1.60.0040.00417.62
8.1.50.0060.00617.57
8.1.40.0060.00617.57
8.1.30.0040.00717.57
8.1.20.0000.00817.59
8.1.10.0000.00717.59
8.1.00.0040.00417.54
8.0.300.0040.00420.16
8.0.290.0040.00416.63
8.0.280.0030.00318.45
8.0.270.0030.00317.30
8.0.260.0000.00620.09
8.0.250.0050.00216.96
8.0.240.0060.00016.97
8.0.230.0030.00316.96
8.0.220.0030.00316.77
8.0.210.0080.00016.92
8.0.200.0000.00816.96
8.0.190.0040.00416.87
8.0.180.0040.00416.84
8.0.170.0060.00316.93
8.0.160.0080.00016.95
8.0.150.0040.00416.82
8.0.140.0070.00016.88
8.0.130.0000.00613.25
8.0.120.0040.00416.87
8.0.110.0040.00416.92
8.0.100.0070.00016.97
8.0.90.0000.00716.98
8.0.80.0070.00716.90
8.0.70.0080.00016.78
8.0.60.0000.00716.77
8.0.50.0000.00816.89
8.0.30.0110.01017.03
8.0.20.0130.01117.23
8.0.10.0000.00816.98
8.0.00.0110.00916.78
7.4.330.0000.00415.55
7.4.320.0030.00316.42
7.4.300.0000.00716.63
7.4.290.0070.00016.53
7.4.280.0000.00916.61
7.4.270.0030.00316.46
7.4.260.0030.00313.22
7.4.250.0040.00416.44
7.4.240.0000.00716.59
7.4.230.0030.00316.51
7.4.220.0050.00216.58
7.4.210.0020.01416.52
7.4.200.0080.00016.42
7.4.140.0140.00417.86
7.4.130.0180.00016.49
7.4.120.0110.00816.52
7.4.110.0130.00516.63
7.4.100.0030.01516.53
7.4.90.0150.00316.53
7.4.80.0080.00819.39
7.4.70.0100.01016.38
7.4.60.0070.01016.52
7.4.50.0100.00716.39
7.4.40.0090.00816.46
7.4.10.0070.01014.90
7.4.00.0100.01014.91
7.3.330.0040.00316.13
7.3.320.0070.00013.07
7.3.310.0000.00716.31
7.3.300.0070.00016.08
7.3.290.0000.00716.13
7.3.280.0080.00816.19
7.3.260.0140.00616.23
7.3.240.0100.00916.18
7.3.230.0140.01016.14
7.3.210.0100.00616.42
7.3.200.0070.01016.47
7.3.190.0060.01616.14
7.3.180.0030.01216.38
7.3.170.0060.01216.32
7.3.160.0030.01716.13
7.3.130.0070.00714.91
7.3.120.0070.01114.70
7.3.110.0150.00414.82
7.3.100.0070.00714.63
7.3.90.0000.01414.79
7.3.80.0020.00814.67
7.3.70.0060.01014.68
7.3.60.0100.00714.77
7.3.50.0040.00714.67
7.3.40.0060.00314.59
7.3.30.0050.00714.61
7.3.20.0070.00716.46
7.3.10.0050.00816.61
7.3.00.0030.00816.54
7.2.330.0040.01516.32
7.2.320.0120.01216.49
7.2.310.0130.00316.32
7.2.300.0100.00716.39
7.2.290.0100.00716.15
7.2.260.0000.01814.70
7.2.250.0060.01315.08
7.2.240.0100.00314.76
7.2.230.0080.00815.01
7.2.220.0040.01414.76
7.2.210.0080.00814.71
7.2.200.0040.01014.87
7.2.190.0040.01014.64
7.2.180.0110.00014.83
7.2.170.0070.00714.88
7.2.160.0030.01314.74
7.2.150.0030.01116.57
7.2.140.0070.00516.70
7.2.130.0060.00916.66
7.2.120.0040.00816.69
7.2.110.0050.00516.46
7.2.100.0070.00816.60
7.2.90.0100.00716.62
7.2.80.0100.00616.79
7.2.70.0090.00516.75
7.2.60.0100.00516.83
7.2.50.0070.00716.48
7.2.40.0060.00716.65
7.2.30.0060.01016.72
7.2.20.0070.00716.72
7.2.10.0080.00816.61
7.2.00.0080.00516.63
7.1.330.0060.01015.49
7.1.320.0030.01315.81
7.1.310.0060.00915.65
7.1.300.0080.00315.48
7.1.290.0070.00415.54
7.1.280.0050.00915.59
7.1.270.0070.00715.62
7.1.260.0100.00615.46
7.1.250.0080.00715.73
7.1.240.0060.00615.37
7.1.230.0060.00315.61
7.1.220.0030.01415.62
7.1.210.0120.00315.32
7.1.200.0090.00615.63
7.1.190.0070.00415.65
7.1.180.0000.01515.57
7.1.170.0060.00315.57
7.1.160.0060.00915.58
7.1.150.0060.01015.52
7.1.140.0100.00015.55
7.1.130.0000.00815.62
7.1.120.0070.00715.50
7.1.110.0110.00415.41
7.1.100.0060.00315.32
7.1.90.0040.00715.89
7.1.80.0000.01315.43
7.1.70.0140.00015.73
7.1.60.0060.00615.71
7.1.50.0060.00615.30
7.1.40.0030.00915.57
7.1.30.0030.01015.43
7.1.20.0060.00315.41
7.1.10.0000.01415.42
7.1.00.0100.00315.55

preferences:
62.58 ms | 401 KiB | 5 Q