Chalarangelo/30-seconds-of-php

Trying to understand "useless" code

davidsneighbour opened this issue · 2 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.

lock 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.