3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ [ 'sku' => '049-1090', 'color' => 'color:Beige;Brown|', 'Finish' => 'Finish:Distressed;Handscraped;Matt|', 'Grade' => 'Grade:B (Select/Advantage)|', 'Installation Location' => 'Installation Location:Second Floor;Main Floor|', 'Installation Method' => 'Installation Method:Nail Down|', 'Specie' => 'Specie:Maple|', 'Warranty' => 'Warranty:25 Years|', 'Width' => 'Width:5 inch|' ], [ 'sku' => '107-1079', 'color' => 'color:Brown;Yellow|', 'Edge' => 'Edge:Square Edge|', 'Finish' => 'Finish:Matt|', 'Grade' => 'Grade:B (Select/Advantage)|', 'Installation Location' => 'Installation Location:Second Floor;Main Floor|', 'Installation Method' => 'Installation Method:Glue Down;Nail Down|', 'Specie' => 'Specie:Maple|', 'Warranty' => 'Warranty:25 Years|', 'Width' => 'Width:3 5/8 inch|' ] ]; $final_array = []; foreach ($data as $row) { $sku = $row['sku']; unset($row['sku']); $final_array[] = [ 'sku' => $sku, 'feature' => rtrim(implode($row), '|') ]; } var_export($final_array);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => array ( 'sku' => '049-1090', 'feature' => 'color:Beige;Brown|Finish:Distressed;Handscraped;Matt|Grade:B (Select/Advantage)|Installation Location:Second Floor;Main Floor|Installation Method:Nail Down|Specie:Maple|Warranty:25 Years|Width:5 inch', ), 1 => array ( 'sku' => '107-1079', 'feature' => 'color:Brown;Yellow|Edge:Square Edge|Finish:Matt|Grade:B (Select/Advantage)|Installation Location:Second Floor;Main Floor|Installation Method:Glue Down;Nail Down|Specie:Maple|Warranty:25 Years|Width:3 5/8 inch', ), )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
94.71 ms | 402 KiB | 8 Q