3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)", "Microsoft Network Adapter Multiplexor Driver", "Microsoft Network Adapter Multiplexor Driver Simplified", "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client) #75", "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)", "Microsoft Network Adapter Multiplexor Driver", "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)", "QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)", ]; $lookup = []; foreach (array_count_values($array) as $value => $count) { if ($count > 1) { $lookup[$value] = 0; } } foreach ($array as &$value) { $value .= (isset($lookup[$value]) ? "_" . ++$lookup[$value] : ''); } var_export($array);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)_1', 1 => 'Microsoft Network Adapter Multiplexor Driver_1', 2 => 'Microsoft Network Adapter Multiplexor Driver Simplified', 3 => 'QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client) #75', 4 => 'QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)_2', 5 => 'Microsoft Network Adapter Multiplexor Driver_2', 6 => 'QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)_3', 7 => 'QLogic BCM57810 10 Gigabit Ethernet (NDIS VBD Client)_4', )

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:
129.84 ms | 407 KiB | 5 Q