3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "01/11/2016 Aggregated Micro Power Holdings plc (AMPH) JPMorgan Global Growth & Income plc (JPGI) Murray Income Trust plc (MUT)"; preg_match_all('/(?P<date>\d+\/\d+\/\d+)\s|\G\s*(?P<company>.*?)\s*\((?P<epic>.*?)\)/', $string, $matches, PREG_SET_ORDER); var_dump($matches);
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { [0]=> array(3) { [0]=> string(11) "01/11/2016 " ["date"]=> string(10) "01/11/2016" [1]=> string(10) "01/11/2016" } [1]=> array(7) { [0]=> string(42) "Aggregated Micro Power Holdings plc (AMPH)" ["date"]=> string(0) "" [1]=> string(0) "" ["company"]=> string(35) "Aggregated Micro Power Holdings plc" [2]=> string(35) "Aggregated Micro Power Holdings plc" ["epic"]=> string(4) "AMPH" [3]=> string(4) "AMPH" } [2]=> array(7) { [0]=> string(43) " JPMorgan Global Growth & Income plc (JPGI)" ["date"]=> string(0) "" [1]=> string(0) "" ["company"]=> string(35) "JPMorgan Global Growth & Income plc" [2]=> string(35) "JPMorgan Global Growth & Income plc" ["epic"]=> string(4) "JPGI" [3]=> string(4) "JPGI" } [3]=> array(7) { [0]=> string(30) " Murray Income Trust plc (MUT)" ["date"]=> string(0) "" [1]=> string(0) "" ["company"]=> string(23) "Murray Income Trust plc" [2]=> string(23) "Murray Income Trust plc" ["epic"]=> string(3) "MUT" [3]=> string(3) "MUT" } }

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:
18.17 ms | 403 KiB | 8 Q