3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dwellingInfo = [ ["AAA", "Chimney with red bricks"], ["BBB", "Two wide windows in the main floor"], ["CCC", "Roof tiles renewed in 2015"] ]; $haystack = implode( ',', array_column($dwellingInfo, 1) ); $dwellingAttributes = [ ["0001", 'Chimney', '/\b(?:Chimney with|Big stove)\b/i'], ["0002", 'Garden', '/\bgarden\b/i'], ["0003", 'Roof tiles', '/\bRoof tiles\b/i'], ["0004", 'Windows', '/\bwindows?\b/i'], ["0005", 'Garage', '/\b(?:garage|car port|under cover area)\b/i'] ]; foreach ($dwellingAttributes as [$id, $term, $pattern]) { printf( "%s - %s - %s\n", $id, $term, preg_match($pattern, $haystack) ? 'available' : 'unavailable' ); }
Output for git.master, git.master_jit, rfc.property-hooks
0001 - Chimney - available 0002 - Garden - unavailable 0003 - Roof tiles - available 0004 - Windows - available 0005 - Garage - unavailable

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:
84.94 ms | 405 KiB | 5 Q