What do you want to do? concatenate strings? use implode :
echo implode('_', array(0, 0));
not shorter, but definitely less confusing, more readable and best conveys the intention
now edit that question has enough information:
you have a class that implements the ArrayAccess interface.
why not use decimal numbers to reach your cutting operator?
$a = new PythonArray(array(1, 2, 3, 4, 5)); $b = $a[1.3];
you must then convert the number to a string and divide by period. You can also use floor to get both parts. then delegate array_slice :
list($start, $len) = explode('.', (string)$offset); return array_slice($internal_array, $start, $len);
remember that floating point precision issues may occur. what is wrong with quotation marks? two extra characters are not so bad.
source share