3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'lo: 00:00:00:00:00:00 enp0s25: 00:21:cc:d4:2a:23 wlp3s0: 84:3a:4b:03:3c:3a wwp0s20u4: 7a:e3:2a:de:66:09 br-a02a0801833f: 02:42:75:b4:8b:58 docker0: 02:42:cb:f0:5f:0d'; preg_match_all('/([a-z0-9-]+):\s+((?:[0-9a-f]{2}:){5}[0-9a-f]{2})/i', $str, $matches); $output = array_combine($matches[1], $matches[2]); echo json_encode($output, JSON_PRETTY_PRINT);
Output for git.master, git.master_jit, rfc.property-hooks
{ "lo": "00:00:00:00:00:00", "enp0s25": "00:21:cc:d4:2a:23", "wlp3s0": "84:3a:4b:03:3c:3a", "wwp0s20u4": "7a:e3:2a:de:66:09", "br-a02a0801833f": "02:42:75:b4:8b:58", "docker0": "02:42:cb:f0:5f:0d" }

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:
20 ms | 1503 KiB | 4 Q