Chalarangelo / 30-seconds-of-php

Short PHP code snippets for all your development needs

Home Page:https://www.30secondsofcode.org/php/p/1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trying to understand "useless" code

davidsneighbour opened this issue · comments

I am trying to understand the sense (strategy? meaning?) behind a function like the following:

function chunk($items, $size)
{
    return array_chunk($items, $size);
}

There is nothing to it, and only the array part of the function name is dropped. Is this something where all "30 seconds of ***" must have a chunk function or is it one of these "organically grown" functions that were not available in PHP before version X?

It's surely useless... It should be dropped IMHO.

commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for any follow-up tasks.