0,"rake"=>0]; $counts = recordVote($counts,"drill"); $counts = recordVote($counts,"rake"); $counts = recordVote($counts,"drill"); echo json_encode($counts,JSON_THROW_ON_ERROR), "\n"; if ($counts !== ["drill"=>2,"rake"=>1]) throw new RuntimeException("Wrong tally");