3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = " Name: John Doe Address: 123 Main St City: Chicago State: IL Zip: 60021 Name: Jane Smith Address: 123 State Ave City: Boston State: MA Zip: 02501 Name: John Doe Address: 123 Main St City: Chicago State: IL Zip: 60021"; preg_match_all('!(Name.*|Address.*|City.*|State.*|Zip.*)!', $string, $results); $records = array_chunk($results[0], 5); var_dump($records);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> array(5) { [0]=> string(14) "Name: John Doe" [1]=> string(20) "Address: 123 Main St" [2]=> string(13) "City: Chicago" [3]=> string(9) "State: IL" [4]=> string(10) "Zip: 60021" } [1]=> array(5) { [0]=> string(16) "Name: Jane Smith" [1]=> string(22) "Address: 123 State Ave" [2]=> string(12) "City: Boston" [3]=> string(9) "State: MA" [4]=> string(10) "Zip: 02501" } [2]=> array(5) { [0]=> string(14) "Name: John Doe" [1]=> string(20) "Address: 123 Main St" [2]=> string(13) "City: Chicago" [3]=> string(9) "State: IL" [4]=> string(10) "Zip: 60021" } }

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.78 ms | 1781 KiB | 4 Q