3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace App\Support; use ArrayObject; final class Config extends ArrayObject { } $settings = [ 'section' => [ 'key1' => 'my_value_1', 'key2' => 'my_value_2', ], ]; $config = new Config($settings); //$config->setFlags(ArrayObject::ARRAY_AS_PROPS); print_r($config['section']); final class MyExample { private Config $config; public function __construct(Config $config) { $this->config = $config; } public function doSomething(): void { $value1 = $this->config['section']['key1']; // Output: my_value_1 echo $value1; } } $example = new MyExample($config); $example->doSomething();

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.20.0170.00318.88
8.4.10.0080.00819.59
8.3.150.0110.00718.78
8.3.140.0040.00416.79
8.3.130.0000.00916.80
8.3.120.0060.00918.97
8.3.110.0000.00820.94
8.3.100.0040.01524.06
8.3.90.0030.00626.77
8.3.80.0070.00718.30
8.3.70.0120.00916.50
8.3.60.0150.00016.63
8.3.50.0120.00916.68
8.3.40.0110.00320.43
8.3.30.0060.00920.21
8.3.20.0130.00724.18
8.3.10.0070.01124.66
8.3.00.0090.00924.66
8.2.260.0000.01520.37
8.2.250.0090.00016.75
8.2.240.0000.01017.05
8.2.230.0030.00622.58
8.2.220.0040.00437.54
8.2.210.0000.00926.77
8.2.200.0110.00016.50
8.2.190.0100.00716.71
8.2.180.0110.00716.32
8.2.170.0130.00722.96
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0070.01124.66
8.2.130.0140.00324.66
8.2.120.0040.01124.66
8.2.110.0190.00024.66
8.2.100.0120.00324.66
8.2.90.0000.01524.66
8.2.80.0170.00324.66
8.2.70.0080.00824.66
8.2.60.0100.01024.66
8.2.50.0130.00724.66
8.2.40.0160.00324.66
8.2.30.0100.01024.66
8.2.20.0040.01524.66
8.2.10.0040.00424.66
8.2.00.0000.00824.66
8.1.310.0070.00718.19
8.1.300.0090.00616.39
8.1.290.0060.00330.84
8.1.280.0110.00425.92
8.1.270.0030.00624.66
8.1.260.0050.00324.66
8.1.250.0090.00024.66
8.1.240.0090.00624.66
8.1.230.0150.00024.66
8.1.220.0090.00324.66
8.1.210.0060.00324.66
8.1.200.0120.00424.66
8.1.190.0080.00024.66
8.1.180.0050.00324.66
8.1.170.0030.00624.66
8.1.160.0060.00324.66
8.1.150.0090.00024.66
8.1.140.0030.00624.66
8.1.130.0030.00524.66
8.1.120.0030.00524.66
8.1.110.0000.00824.66
8.1.100.0000.00824.66
8.1.90.0040.00424.66
8.1.80.0080.00024.66
8.1.70.0000.00824.66
8.1.60.0040.00424.66
8.1.50.0070.00324.66
8.1.40.0070.00424.66
8.1.30.0080.00424.66
8.1.20.0090.00024.66
8.1.10.0040.00424.66
8.1.00.0040.00424.66

preferences:
31.21 ms | 403 KiB | 5 Q