3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "php/127/typescript/12/jquery/120/angular/50"; preg_match_all("/([^\/]*?)\/(\d+)/", $str, $match); /* result: Array ( [0] => Array ( [0] => php/127 [1] => typescript/12 [2] => jquery/120 [3] => angular/50 ) [1] => Array ( [0] => php [1] => typescript [2] => jquery [3] => angular ) [2] => Array ( [0] => 127 [1] => 12 [2] => 120 [3] => 50 ) ) */ #then combine match[1] and match[2] $result = array_combine($match[1], $match[2]); /* result Array ( [php] => 127 [typescript] => 12 [jquery] => 120 [angular] => 50 ) */ print_r($result);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [php] => 127 [typescript] => 12 [jquery] => 120 [angular] => 50 )

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