3v4l.org

run code in 300+ PHP versions simultaneously
<?php $product = [ 'title' => 'Modest Swimsuit - Full body', 'description' => 'UV +50 Protection - Chlorine Resistant - Water Resistant - Quick Drying - Maximum Breathe Ability- Sea, Water Resistant', 'price' => 59.95, 'stock' => 20, ]; $attributes = [ ['name' => 'Brand', 'value' => 'Modestly Active Swimwear'], ['name' => 'Colour', 'value' => 'Black and Light Blue'], ['name' => 'size', 'value' => 'small'], ['name' => 'size', 'value' => 'medium'], ['name' => 'size', 'value' => 'large'], ]; $pivoted = []; foreach ($attributes as ['name' => $name, 'value' => $value]) { $name = strtolower($name); if (isset($pivoted[$name])) { $pivoted[$name] = (array) $pivoted[$name]; $pivoted[$name][] = $value; } else { $pivoted[$name] = $value; } } var_export($product + $pivoted);

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.10.0080.01116.67
8.5.00.0150.00619.98
8.4.150.0030.00014.05
8.4.140.0150.00917.70
8.4.130.0120.00818.64
8.4.120.0140.00623.97
8.4.110.0110.00918.71
8.4.100.0060.00318.00
8.4.90.0120.00820.61
8.4.80.0030.00518.89
8.4.70.0110.00820.64
8.4.60.0120.00820.28
8.4.50.0100.01120.69
8.4.40.0100.01018.64
8.4.30.0100.01118.67
8.4.20.0130.00619.47
8.4.10.0030.00619.43
8.3.280.0120.00718.35
8.3.270.0110.00816.72
8.3.260.0060.00516.73
8.3.250.0070.00218.84
8.3.240.0140.00616.99
8.3.230.0100.00916.64
8.3.220.0050.00418.77
8.3.210.0120.00516.85
8.3.200.0080.00216.63
8.3.190.0110.00919.02
8.3.180.0140.00719.08
8.3.170.0100.00717.30
8.3.160.0090.00918.33
8.3.150.0110.01116.32
8.3.140.0140.00416.68
8.3.130.0060.00316.54
8.3.120.0070.00719.11
8.3.110.0080.00020.94
8.3.100.0080.00024.06
8.3.90.0040.00426.77
8.3.80.0110.00016.36
8.3.70.0180.00318.43
8.3.60.0120.00316.77
8.3.50.0140.00922.07
8.3.40.0340.00317.38
8.3.30.0250.00717.25
8.3.20.0290.00717.25
8.3.10.0230.00917.13
8.3.00.0330.00717.24
8.2.290.0100.00916.79
8.2.280.0070.00418.53
8.2.270.0160.00318.28
8.2.260.0040.01117.09
8.2.250.0040.00416.73
8.2.240.0080.00017.05
8.2.230.0030.00622.58
8.2.220.0030.00637.54
8.2.210.0030.01026.77
8.2.200.0070.00316.63
8.2.190.0070.00716.75
8.2.180.0210.01215.85
8.2.170.0290.00417.38
8.2.160.0250.00817.63
8.2.150.0240.01217.88
8.2.140.0250.01417.50
8.2.130.0350.00317.38
8.2.120.0330.00717.50
8.2.110.0300.00617.50
8.2.100.0300.00717.38
8.2.90.0340.00317.74
8.2.80.0240.00917.63
8.2.70.0280.01017.37
8.2.60.0230.01017.49
8.2.50.0310.00617.50
8.2.40.0170.01717.25
8.2.30.0250.01317.50
8.2.20.0260.00617.59
8.2.10.0310.00317.13
8.2.00.0270.00717.50
8.1.330.0110.00815.94
8.1.320.0120.00816.30
8.1.310.0100.00716.81
8.1.300.0150.00316.74
8.1.290.0040.00418.88
8.1.280.0120.00625.92
8.1.270.0280.00817.38
8.1.260.0300.00617.11
8.1.250.0320.00717.24
8.1.240.0220.00817.13
8.1.230.0290.00417.00
8.1.220.0280.00617.25
8.1.210.0240.01317.25
8.1.200.0320.00617.10
8.1.190.0220.00917.23
8.1.180.0280.00416.84
8.1.170.0230.01017.00
8.1.160.0260.01017.13
8.1.150.0250.00717.25
8.1.140.0110.01517.25
8.1.130.0310.00617.13
8.1.120.0240.01117.13
8.1.110.0290.00317.22
8.1.100.0190.01217.22
8.1.90.0100.00717.09
8.1.80.0100.00717.25
8.1.70.0080.00817.22
8.1.60.0160.00017.46
8.1.50.0090.00917.13
8.1.40.0030.01317.25
8.1.30.0060.01217.35
8.1.20.0120.00617.63
8.1.10.0120.00417.38
8.1.00.0100.01017.13

preferences:
35.55 ms | 403 KiB | 5 Q