3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; class Request { private array $attributes = []; public function __get(string $key): mixed { return $this->$attributes[$key]; } public function __set(string $key, mixed $value): void { $this->attributes[$key] = $value; } public function only(array $keys): array { return array_intersect_key($this->attributes, array_flip($keys)); } } $request = new Request(); $request->name = 'Foo'; $request->objectives = 'Test'; $request->requirements = 'Test'; // ... var_dump($request->only(['name', 'objectives']));

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.5.00.0120.01020.11
8.4.150.0030.00014.05
8.4.140.0120.00917.58
8.4.130.0120.00720.58
8.4.120.0110.00720.43
8.4.110.0120.00922.50
8.4.100.0130.00820.61
8.4.90.0110.00918.74
8.4.80.0100.01020.59
8.4.70.0110.01017.68
8.4.60.0130.00718.73
8.4.50.0110.01020.30
8.4.40.0150.00419.80
8.4.30.0160.00318.91
8.4.20.0060.01317.79
8.4.10.0100.01023.69
8.3.280.0130.00618.25
8.3.270.0110.00916.72
8.3.260.0100.00616.52
8.3.250.0040.00519.05
8.3.240.0120.00818.98
8.3.230.0090.01016.60
8.3.220.0110.00718.83
8.3.210.0130.00716.41
8.3.200.0130.00316.59
8.3.190.0060.00717.11
8.3.180.0110.00916.53
8.3.170.0040.01120.77
8.3.160.0130.00617.25
8.3.150.0120.00617.26
8.3.140.0110.00716.61
8.3.130.0030.00716.53
8.3.120.0030.00620.78
8.3.110.0050.00316.59
8.3.100.0060.00316.60
8.3.90.0040.00426.77
8.3.80.0040.00416.50
8.3.70.0060.00916.58
8.3.60.0140.00416.63
8.3.50.0110.00720.32
8.3.40.0110.00422.02
8.3.30.0070.00718.79
8.3.20.0030.00524.18
8.3.10.0000.00824.66
8.3.00.0040.00426.16
8.2.290.0090.00820.32
8.2.280.0120.00918.50
8.2.270.0090.00917.00
8.2.260.0040.01116.46
8.2.250.0040.00419.21
8.2.240.0090.00017.34
8.2.230.0000.00820.94
8.2.220.0000.00824.06
8.2.210.0050.00326.77
8.2.200.0030.00616.88
8.2.190.0080.01216.58
8.2.180.0110.00725.92
8.2.170.0170.00322.96
8.2.160.0040.01122.96
8.2.150.0080.00025.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0060.00919.84
8.2.110.0070.00321.12
8.2.100.0090.00317.72
8.2.90.0000.00817.75
8.2.80.0080.00018.56
8.2.70.0030.00617.50
8.2.60.0040.00417.80
8.2.50.0080.00018.05
8.2.40.0050.00319.94
8.2.30.0000.00718.09
8.2.20.0030.00519.13
8.2.10.0040.00417.95
8.2.00.0040.00419.25
8.1.330.0110.00721.85
8.1.320.0090.00616.09
8.1.310.0080.00018.51
8.1.300.0100.01018.12
8.1.290.0060.00330.84
8.1.280.0090.00625.92
8.1.270.0000.00724.66
8.1.260.0030.00626.35
8.1.250.0140.00028.09
8.1.240.0120.00017.23
8.1.230.0030.01017.89
8.1.220.0030.00617.76
8.1.210.0050.00318.77
8.1.200.0050.00517.23
8.1.190.0100.00017.22
8.1.180.0040.00418.10
8.1.170.0030.00518.59
8.1.160.0070.00018.82
8.1.150.0000.00818.50
8.1.140.0040.00417.39
8.1.130.0000.00720.52
8.1.120.0030.00617.36
8.1.110.0050.00217.40
8.1.100.0080.00817.35
8.1.90.0100.00517.30
8.1.80.0130.00317.30
8.1.70.0120.00217.29
8.1.60.0150.00317.52
8.1.50.0090.00717.39
8.1.40.0180.00017.54
8.1.30.0120.00617.55
8.1.20.0120.00517.68
8.1.10.0060.01117.61
8.1.00.0000.01017.46
8.0.300.0040.00418.77
8.0.290.0030.00616.63
8.0.280.0000.00718.38
8.0.270.0070.00017.17
8.0.260.0030.00318.39
8.0.250.0030.00316.90
8.0.240.0130.00316.77
8.0.230.0110.00516.89
8.0.220.0140.00016.80
8.0.210.0100.00516.83
8.0.200.0120.00216.88
8.0.190.0090.00516.71
8.0.180.0150.00016.76
8.0.170.0120.00316.89
8.0.160.0120.00416.70
8.0.150.0110.00416.78
8.0.140.0100.00516.67
8.0.130.0160.00016.74
8.0.120.0050.01016.83
8.0.110.0090.00616.82
8.0.100.0100.00516.77
8.0.90.0160.00016.72
8.0.80.0150.00016.77
8.0.70.0090.00616.67
8.0.60.0130.00316.88
8.0.50.0100.00516.71
8.0.30.0060.00916.71
8.0.20.0110.00316.84
8.0.10.0100.00416.96
7.4.330.0000.00515.55
7.4.320.0070.00016.40
7.4.300.0180.00016.35
7.4.290.0170.00016.51
7.4.280.0130.00316.53
7.4.270.0110.00516.58
7.4.260.0030.00916.50
7.4.250.0090.00416.40
7.4.240.0000.01616.61
7.4.230.0060.00616.54
7.4.220.0140.00016.49
7.4.210.0110.00216.35
7.4.200.0090.00416.38
7.4.190.0080.00516.58
7.4.180.0100.00316.54
7.4.160.0060.00316.66
7.4.150.0120.00316.52
7.4.140.0090.00616.43
7.4.130.0070.00716.41
7.4.120.0130.00016.42
7.4.110.0040.00916.40
7.4.100.0090.00516.50
7.4.90.0070.00716.44
7.4.80.0070.00716.50
7.4.70.0060.00616.48
7.4.60.0060.00616.47
7.4.50.0100.00316.34
7.4.40.0030.01116.40
7.4.30.0060.00616.45
7.4.20.0130.00016.52
7.4.10.0100.00016.47
7.4.00.0080.00416.45

preferences:
30.33 ms | 403 KiB | 5 Q