3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a() { return [ 100 => 'first', 101 => 'second', 102 => 'third', 'named' => 'fourth', ]; } function b() { yield 100 => 'first'; yield 101 => 'second'; yield 102 => 'third'; yield 'named' => 'fourth'; } function c() { yield '100' => 'first'; yield '101' => 'second'; yield '102' => 'third'; yield 'named' => 'fourth'; } function test($x=null, $y=null, ...$z) { var_dump($x, $y, $z); } test(...a()); echo "\n"; test(...b()); echo "\n"; test(...c());

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.0170.00620.04
8.4.150.0030.00014.05
8.4.140.0140.00717.64
8.4.130.0130.00817.55
8.4.120.0120.00820.55
8.4.110.0050.00318.69
8.4.100.0150.00717.53
8.4.90.0100.01117.66
8.4.80.0080.00019.52
8.4.70.0350.01117.63
8.4.60.0370.00817.39
8.4.50.0370.00917.45
8.4.40.0390.01017.35
8.4.30.0390.01117.38
8.4.20.0390.00617.55
8.4.10.0390.01217.59
8.3.280.0100.01018.38
8.3.270.0130.00616.57
8.3.260.0090.00816.36
8.3.250.0110.00818.76
8.3.240.0110.01016.49
8.3.230.0100.00916.56
8.3.220.0040.00418.60
8.3.210.0390.00516.51
8.3.200.0300.01316.20
8.3.190.0340.00516.50
8.3.180.0200.00516.63
8.3.170.0180.00316.40
8.3.160.0330.00616.20
8.3.150.0390.00416.31
8.3.140.0350.01316.27
8.3.130.0310.00816.23
8.3.120.0320.00616.26
8.3.110.0290.00816.27
8.3.100.0410.00816.36
8.3.90.0430.00816.30
8.3.80.0370.01116.28
8.3.70.0390.00716.71
8.3.60.0400.01516.21
8.3.50.0360.00416.42
8.3.40.0220.00717.30
8.3.30.0290.00417.35
8.3.20.0280.00917.35
8.3.10.0260.00717.28
8.3.00.0210.00917.29
8.2.290.0100.00918.86
8.2.280.0310.00716.20
8.2.270.0180.01016.20
8.2.260.0270.00416.39
8.2.250.0150.00716.52
8.2.240.0160.00316.32
8.2.230.0140.00516.32
8.2.220.0260.00716.20
8.2.210.0160.00416.20
8.2.200.0150.00416.40
8.2.190.0130.00716.20
8.2.180.0150.00316.29
8.2.170.0200.00717.39
8.2.160.0260.00817.39
8.2.150.0160.00417.43
8.2.140.0250.00617.23
8.2.130.0330.00517.40
8.2.120.0170.00417.50
8.2.110.0280.00517.25
8.2.100.0130.00717.32
8.2.90.0190.00317.61
8.2.80.0290.00417.36
8.2.70.0230.00817.25
8.2.60.0230.00517.24
8.2.50.0220.00717.21
8.2.40.0280.00417.28
8.2.30.0150.00317.46
8.2.20.0130.00617.35
8.2.10.0160.00517.31
8.2.00.0180.00317.24

preferences:
31.46 ms | 403 KiB | 5 Q