3v4l.org

run code in 300+ PHP versions simultaneously
<?php $descriptions = [ 'STRIPLED 9.6W 24V 2.7K 120LED IP20 1CM', 'STRIPLED 9.6W 24V 3K 120LED IP20 1CM', 'STRIPLED H 6 W 24V 4K 140 LED IP20 1CM', 'STRIPLED HO 12.3 W 24V 3K 128 LED IP65 1CM', 'STRIPLED HO 20W 24V 2.7K 280 LED IP65 1CM', 'STRIPLED 14.4W 24V 2.7K 180 LED IP65 1 CM', ]; $desc = array_map(function ($v) { preg_match('/^\w+\s+([^V]+V)\s+([\d.,]+)K.*?(IP\d+)/', $v, $m); array_shift($m); return $m; }, $descriptions); print_r($desc);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => 9.6W 24V [1] => 2.7 [2] => IP20 ) [1] => Array ( [0] => 9.6W 24V [1] => 3 [2] => IP20 ) [2] => Array ( [0] => H 6 W 24V [1] => 4 [2] => IP20 ) [3] => Array ( [0] => HO 12.3 W 24V [1] => 3 [2] => IP65 ) [4] => Array ( [0] => HO 20W 24V [1] => 2.7 [2] => IP65 ) [5] => Array ( [0] => 14.4W 24V [1] => 2.7 [2] => IP65 ) )

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:
53.61 ms | 1643 KiB | 4 Q