3v4l.org

run code in 300+ PHP versions simultaneously
<?php $users = [['username' => 'Timothy'], ['username' => 'Frederic']]; $users2 = [['username' => 'Johnathon'], ['username' => 'Frederic'], ['username' => 'Peter']]; $counts = array_count_values( [ ...array_column($users, 'username'), ...array_column($users2, 'username') ] ); foreach ($counts as $user => $count) { printf( "<option%s>%s</option>\n", $count > 1 ? ' selected' : '', htmlentities($user) ); }
Output for git.master_jit, git.master
<option>Timothy</option> <option selected>Frederic</option> <option>Johnathon</option> <option>Peter</option>

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