3v4l.org

run code in 300+ PHP versions simultaneously
<?php $products = ['canvas']; $availableSizes = ['8x10', '10x10', '12x12']; $materials = ["matte", "luster"]; $colors = ['red', 'white', 'blue']; var_export( array_merge(...array_map( fn($product) => array_merge(...array_map( fn($size) => array_merge(...array_map( fn($material) => array_map( fn($color) => implode('_', [$product, $size, $material, $color]), $colors ), $materials )), $availableSizes )), $products )) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'canvas_8x10_matte_red', 1 => 'canvas_8x10_matte_white', 2 => 'canvas_8x10_matte_blue', 3 => 'canvas_8x10_luster_red', 4 => 'canvas_8x10_luster_white', 5 => 'canvas_8x10_luster_blue', 6 => 'canvas_10x10_matte_red', 7 => 'canvas_10x10_matte_white', 8 => 'canvas_10x10_matte_blue', 9 => 'canvas_10x10_luster_red', 10 => 'canvas_10x10_luster_white', 11 => 'canvas_10x10_luster_blue', 12 => 'canvas_12x12_matte_red', 13 => 'canvas_12x12_matte_white', 14 => 'canvas_12x12_matte_blue', 15 => 'canvas_12x12_luster_red', 16 => 'canvas_12x12_luster_white', 17 => 'canvas_12x12_luster_blue', )

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:
107.7 ms | 407 KiB | 5 Q