I want to get sessionIds array. I know 2 way to fill up and which one should i chooce? Can usage of the array_keys method lose performance?
First way:
//For loop
$aggregateDataPerSessions[$gameSession['game_session_id']] = $gameSession;
$sessionIds[] = $gameSession['game_session_id']
//End loop
Second way:
//For loop
$aggregateDataPerSessions[$gameSession['game_session_id']] = $gameSession;
//End loop
$sessionIds = array_keys($aggregateDataPerSessions);
According to the test; its up to Php version and there is no big diff https://3v4l.org/3RAU1