3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array ( array ( 'Size', 'variation_id' => array ( 'S', 'M', 'L', 'XL' ) ), array ( 'Length', 'variation_id' => array ( '14 Inches', '18 Inches', ) ) ); $sizes = $data[0]['variation_id']; $lengths = $data[1]['variation_id']; $result = array(); foreach($sizes as $size) foreach($lengths as $length) $result[] = "variation ($size, $length)"; var_dump($result);
Output for git.master, git.master_jit, rfc.property-hooks
array(8) { [0]=> string(24) "variation (S, 14 Inches)" [1]=> string(24) "variation (S, 18 Inches)" [2]=> string(24) "variation (M, 14 Inches)" [3]=> string(24) "variation (M, 18 Inches)" [4]=> string(24) "variation (L, 14 Inches)" [5]=> string(24) "variation (L, 18 Inches)" [6]=> string(25) "variation (XL, 14 Inches)" [7]=> string(25) "variation (XL, 18 Inches)" }

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:
42.1 ms | 402 KiB | 8 Q