3v4l.org

run code in 300+ PHP versions simultaneously
<?php $unflattened_array = [ '["2", "3"]', '["4"]', '["4", "3"]' ]; $flattened_array = []; foreach ($unflattened_array as $items) { array_push($flattened_array, ...json_decode($items)); } $flattened_array = array_unique($flattened_array); var_dump($flattened_array);

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.130.0080.00317.79
8.4.120.0150.00522.28
8.4.110.0100.01018.79
8.4.100.0110.01017.62
8.4.90.0070.00320.57
8.4.80.0060.00218.57
8.4.70.0060.01020.55
8.4.60.0110.01020.59
8.4.50.0090.01118.46
8.4.40.0160.00317.18
8.4.30.0110.00719.06
8.4.20.0100.01019.74
8.4.10.0090.01219.26
8.3.260.0110.00816.75
8.3.250.0120.00618.69
8.3.240.0060.00216.72
8.3.230.0130.00616.49
8.3.220.0030.00418.86
8.3.210.0100.00416.79
8.3.200.0080.00216.27
8.3.190.0080.01017.38
8.3.180.0070.01319.00
8.3.170.0000.01816.99
8.3.160.0090.00920.77
8.3.150.0070.01117.23
8.3.140.0110.00719.11
8.3.130.0050.00318.46
8.3.120.0040.00418.86
8.3.110.0050.00316.62
8.3.100.0130.00618.34
8.3.90.0070.00726.77
8.3.80.0160.00524.57
8.3.70.0180.00823.73
8.3.60.0170.00623.71
8.3.50.0080.00923.65
8.3.40.0150.00825.25
8.3.30.0150.00925.78
8.3.20.0150.00827.26
8.3.10.0140.00727.24
8.3.00.0150.00625.65
8.2.290.0070.01220.34
8.2.280.0140.00618.18
8.2.270.0160.00316.59
8.2.260.0110.00417.10
8.2.250.0070.01116.57
8.2.240.0060.00317.32
8.2.230.0040.00420.94
8.2.220.0090.00024.06
8.2.210.0050.00226.77
8.2.200.0110.00424.50
8.2.190.0160.00323.71
8.2.180.0150.00423.73
8.2.170.0110.01325.67
8.2.160.0150.00726.21
8.2.150.0190.00625.83
8.2.140.0190.00726.52
8.2.130.0220.00626.46
8.2.120.0150.01325.91
8.2.110.0200.01025.98
8.2.100.0340.00225.84
8.2.90.0170.01025.79
8.2.80.0180.00725.92
8.2.70.0220.00625.69
8.2.60.0210.00725.71
8.2.50.0240.00825.86
8.2.40.0190.01225.72
8.2.30.0280.00825.71
8.2.20.0270.00925.70
8.2.10.0220.00625.69
8.2.00.0250.00925.69
8.1.330.0140.00716.76
8.1.320.0100.00918.04
8.1.310.0090.00916.73
8.1.300.0000.00919.65
8.1.290.0150.00324.86
8.1.280.0160.00728.38
8.1.270.0180.00427.31
8.1.260.0130.01027.28
8.1.250.0110.00827.42
8.1.240.0180.00225.53
8.1.230.0120.01025.49
8.1.220.0160.00725.84
8.1.210.0110.01124.73
8.1.200.0180.00325.68
8.1.190.0150.00525.71
8.1.180.0140.00625.52
8.1.170.0180.00325.77
8.1.160.0070.01025.49
8.1.150.0150.00525.65
8.1.140.0130.01025.68
8.1.130.0130.00525.66
8.1.120.0140.00525.65
8.1.110.0090.01224.69
8.1.100.0160.00525.28
8.1.90.0150.00624.71
8.1.80.0100.00725.22
8.1.70.0150.00324.85
8.1.60.0120.00624.76
8.1.50.0170.00224.68
8.1.40.0160.00324.76
8.1.30.0120.00724.84
8.1.20.0170.00125.38
8.1.10.0080.01024.79
8.1.00.0130.00624.67

preferences:
27.22 ms | 403 KiB | 5 Q