3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class Foo { public bool $bar; public array $baz; public function __construct( bool $bar = false, array $baz = [], ) { $this->bar = $bar; $this->baz = $baz; } } final class Bar { public bool $bar = false; public array $baz = []; public function __construct( bool $bar = false, array $baz = [], ) { $this->bar = $bar; $this->baz = $baz; } } $create = static fn(string $class): object => (new \ReflectionClass($class))->newInstanceWithoutConstructor(); var_dump($create(Foo::class)); var_dump($create(Bar::class));

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.4.120.0040.00624.07
8.4.110.0090.01118.69
8.4.100.0150.00518.83
8.4.90.0110.00620.42
8.4.80.0050.00419.04
8.4.70.0130.00919.04
8.4.60.0140.00718.91
8.4.50.0100.01119.26
8.4.40.0030.00617.50
8.4.30.0130.00620.75
8.4.20.0100.01017.85
8.4.10.0090.00019.29
8.3.250.0120.00517.30
8.3.240.0110.00716.98
8.3.230.0130.00616.68
8.3.220.0090.01018.99
8.3.210.0120.00716.46
8.3.200.0060.00216.58
8.3.190.0120.00716.57
8.3.180.0090.01016.46
8.3.170.0060.01219.01
8.3.160.0040.01118.39
8.3.150.0140.00419.05
8.3.140.0030.00617.16
8.3.130.0040.00418.32
8.3.120.0040.00420.63
8.3.110.0000.00820.94
8.3.100.0050.00324.06
8.3.90.0110.00626.77
8.3.80.0000.00918.43
8.3.70.0140.00718.25
8.3.60.0070.01116.63
8.3.50.0140.00716.63
8.3.40.0100.01020.47
8.3.30.0080.00619.29
8.3.20.0070.00024.18
8.3.10.0050.00324.66
8.3.00.0050.00326.16
8.2.290.0140.00620.26
8.2.280.0150.00718.52
8.2.270.0120.00617.43
8.2.260.0030.00616.61
8.2.250.0060.00318.36
8.2.240.0040.01517.02
8.2.230.0000.01622.58
8.2.220.0130.00737.54
8.2.210.0060.01226.77
8.2.200.0060.00316.63
8.2.190.0120.00618.55
8.2.180.0060.00916.63
8.2.170.0180.00018.92
8.2.160.0100.01022.96
8.2.150.0050.00225.66
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0040.00421.05
8.2.110.0120.00920.27
8.2.100.0130.00919.03
8.2.90.0130.01018.78
8.2.80.0120.00918.85
8.2.70.0160.00618.72
8.2.60.0130.00918.79
8.2.50.0140.00718.78
8.2.40.0160.00618.87
8.2.30.0140.00418.83
8.2.20.0120.00618.73
8.2.10.0100.01419.08
8.2.00.0130.00319.21
8.1.330.0050.00421.93
8.1.320.0140.00516.22
8.1.310.0080.00018.27
8.1.300.0040.01517.85
8.1.290.0100.00030.84
8.1.280.0110.00725.92
8.1.270.0080.00024.66
8.1.260.0050.00226.35
8.1.250.0070.00028.09
8.1.240.0200.00318.63
8.1.230.0120.00618.57
8.1.220.0160.00618.61
8.1.210.0140.00719.87
8.1.200.0120.00918.38
8.1.190.0130.01018.25
8.1.180.0160.00620.27
8.1.170.0110.01118.57
8.1.160.0100.00618.82
8.1.150.0090.00018.48
8.1.140.0070.00418.50
8.1.130.0090.00618.34
8.1.120.0140.00718.53
8.1.110.0110.00718.59
8.1.100.0110.00718.62
8.1.90.0040.00718.54
8.1.80.0090.00318.57
8.1.70.0100.00718.89
8.1.60.0100.00018.82
8.1.50.0090.00318.66
8.1.40.0070.00318.79
8.1.30.0080.00418.86
8.1.20.0060.00618.57
8.1.10.0080.00318.54
8.1.00.0050.00518.59
8.0.300.0000.01017.68
8.0.290.0100.00717.71
8.0.280.0060.00317.56
8.0.270.0070.01017.84
8.0.260.0060.01017.69
8.0.250.0030.00617.95
8.0.240.0110.00017.59
8.0.230.0060.00318.34
8.0.220.0030.00717.86
8.0.210.0170.00317.70
8.0.200.0110.00717.89
8.0.190.0110.01117.96
8.0.180.0030.00717.93
8.0.170.0170.00318.02
8.0.160.0100.00717.88
8.0.150.0070.00417.69
8.0.140.0070.01017.73
8.0.130.0110.01117.86
8.0.120.0070.01317.89
8.0.110.0170.00318.07
8.0.100.0090.00917.75
8.0.90.0100.00717.93
8.0.80.0170.00717.88
8.0.70.0130.01017.89
8.0.60.0070.00317.88
8.0.50.0120.00417.78
8.0.30.0030.01317.75
8.0.20.0120.00918.00
8.0.10.0110.00717.95

preferences:
26.8 ms | 403 KiB | 5 Q