<?php function getComments(){ $comments = [ "id" => 1, "comment" => "this is test comment", "favorite_users" => [10, 15, 2, 5], ]; return $comments + ['favorite_users_count' => count($comments['favorite_users'])]; } var_dump(getComments());
You have javascript disabled. You will not be able to edit any code.