<?php $counts = array(); $item = 2; $counts[$item] ?? $counts[$item] = 2 ?? $counts[$item]++; var_dump($counts); $counts[$item] ?? $counts[$item] = 1 ?? $counts[$item]++; var_dump($counts);
You have javascript disabled. You will not be able to edit any code.