3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $test = []; public function __construct() { $this->test['foo'] = 'foo'; $this->test['bar'] = 'bar'; } public function getTest(): array { return $this->test; } } $test = new Test; foreach($test->getTest() as $key => $value) { if ($key === 'foo') { $test->test['baz'] = 'baz'; } var_dump($value); }

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.01116.50
8.3.50.0120.00318.07
8.3.40.0040.01118.84
8.3.30.0070.01018.84
8.3.20.0040.00419.36
8.3.10.0040.00421.90
8.3.00.0070.00020.76
8.2.180.0060.00918.41
8.2.170.0120.00322.96
8.2.160.0110.00319.43
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00419.83
8.2.120.0050.00326.35
8.2.110.0060.00320.32
8.2.100.0000.01118.03
8.2.90.0030.00517.88
8.2.80.0000.00818.73
8.2.70.0040.00417.93
8.2.60.0030.00618.22
8.2.50.0040.00418.10
8.2.40.0040.00420.84
8.2.30.0000.00819.39
8.2.20.0040.00418.10
8.2.10.0030.00619.80
8.2.00.0030.00617.61
8.1.280.0120.00925.92
8.1.270.0080.00018.95
8.1.260.0000.00726.35
8.1.250.0030.00628.09
8.1.240.0070.00318.92
8.1.230.0090.00317.83
8.1.220.0080.00017.76
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0000.00817.51
8.1.180.0000.00918.10
8.1.170.0050.00318.46
8.1.160.0040.00418.89
8.1.150.0000.00818.90
8.1.140.0030.00522.13
8.1.130.0000.00720.14
8.1.120.0030.00317.38
8.1.110.0040.00417.43
8.1.100.0030.00517.48
8.1.90.0000.00717.48
8.1.80.0000.00717.49
8.1.70.0000.00817.43
8.1.60.0070.00017.59
8.1.50.0040.00417.41
8.1.40.0040.00417.57
8.1.30.0000.00817.71
8.1.20.0070.00017.50
8.1.10.0000.00717.58
8.1.00.0000.00817.41
8.0.300.0000.00718.77
8.0.290.0080.00016.72
8.0.280.0000.00718.34
8.0.270.0030.00317.29
8.0.260.0000.00718.38
8.0.250.0000.00616.88
8.0.240.0030.00316.86
8.0.230.0050.00316.86
8.0.220.0040.00416.95
8.0.210.0040.00416.82
8.0.200.0000.00616.97
8.0.190.0000.00717.00
8.0.180.0040.00416.95
8.0.170.0000.00816.95
8.0.160.0050.00216.95
8.0.150.0050.00216.95
8.0.140.0000.00716.75
8.0.130.0000.00613.29
8.0.120.0000.00916.84
8.0.110.0000.00716.80
8.0.100.0040.00416.96
8.0.90.0030.00316.86
8.0.80.0070.01216.88
8.0.70.0040.00416.97
8.0.60.0000.00816.69
8.0.50.0030.00516.77
8.0.30.0090.00817.03
8.0.20.0150.00817.41
8.0.10.0040.00417.09
8.0.00.0070.01516.60
7.4.330.0030.00315.55
7.4.320.0000.00716.59
7.4.300.0060.00016.54
7.4.290.0030.00316.61
7.4.280.0000.00816.69
7.4.270.0060.00316.59
7.4.260.0030.00316.61
7.4.250.0070.00016.59
7.4.240.0040.00416.47
7.4.230.0000.00716.60
7.4.220.0050.00216.57
7.4.210.0050.01016.63
7.4.200.0080.00016.43
7.4.160.0100.01016.49
7.4.140.0110.01117.86
7.4.130.0090.00916.53
7.4.120.0100.00916.46
7.4.110.0100.01016.48
7.4.100.0110.00716.54
7.4.90.0090.00916.65
7.4.80.0100.00719.39
7.4.70.0080.00916.54
7.4.60.0060.01416.46
7.4.50.0110.00416.43
7.4.40.0090.01216.41
7.4.00.0030.01014.77
7.3.330.0030.00313.45
7.3.320.0020.00313.35
7.3.310.0050.00316.43
7.3.300.0030.00416.46
7.3.290.0000.00716.26
7.3.280.0070.00716.34
7.3.260.0140.00716.41
7.3.240.0110.00816.42
7.3.230.0070.01616.39
7.3.210.0070.01016.39
7.3.200.0080.00816.49
7.3.190.0110.01116.63
7.3.180.0100.00716.32
7.3.170.0130.00516.32
7.3.160.0150.00816.64
7.3.10.0060.00616.79
7.3.00.0000.01116.74
7.2.330.0030.01516.73
7.2.320.0120.01216.59
7.2.310.0140.00316.73
7.2.300.0100.00516.78
7.2.290.0140.00316.70
7.2.130.0030.01016.84
7.2.120.0080.00417.04
7.2.110.0070.01115.76
7.2.100.0070.01115.78
7.2.90.0110.00815.97
7.2.80.0110.00915.90
7.2.70.0120.00616.04
7.2.60.0120.00716.09
7.2.50.0130.00516.14
7.2.40.0130.00616.11
7.2.30.0140.00515.84
7.2.20.0120.00615.93
7.2.10.0150.00416.02
7.2.00.0130.00716.06
7.1.250.0060.00615.97
7.1.230.0190.00313.90
7.1.220.0120.00613.94
7.1.210.0200.00813.72
7.1.200.0120.00913.71
7.1.190.0170.00313.83
7.1.180.1160.00714.04
7.1.170.0280.00313.93
7.1.160.0190.00313.88
7.1.150.0190.00614.03
7.1.140.0190.00613.96
7.1.130.0230.00314.07
7.1.120.0180.00613.91
7.1.110.0150.00814.10
7.1.100.0150.00614.05
7.1.90.0260.00714.07
7.1.80.0260.00814.12
7.1.70.0170.00613.86
7.1.60.0330.01032.00
7.1.50.0420.01032.11
7.1.40.0440.01032.02
7.1.30.0370.01632.09
7.1.20.0470.00731.87
7.1.10.0170.00714.01
7.1.00.0160.00613.64
5.6.380.0060.00613.76

preferences:
64.21 ms | 400 KiB | 5 Q