3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parseTicketName($ticketName) { preg_match('/^([[:alpha:]]{2})([[:alpha:]]+)([b|f])([[:digit:]]+)$/', $ticketName, $matches); return array( 'system' => $matches[1], 'project' => $matches[2], 'ticket_id' => $matches[3] ); } // 2 first characters is system, then the next letters are project name and the numbers are the ticket id $s = "ASFXB10"; var_dump(parseTicketName($s));
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key 1 in /in/O0cA2 on line 6 Warning: Undefined array key 2 in /in/O0cA2 on line 7 Warning: Undefined array key 3 in /in/O0cA2 on line 8 array(3) { ["system"]=> NULL ["project"]=> NULL ["ticket_id"]=> NULL }

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:
37.85 ms | 401 KiB | 8 Q