private final int physIndex(int idx) {
		int physIdx = idx+start;
		if (idx >= gapIndex) {
			physIdx += gapSize;
		}
		if (physIdx >= values.length) {
			physIdx -= values.length;
		}
		return physIdx;
	}
Calculate index for physical access to an element.

@param idx	logical index of element
@return		physical index to access element in values[]
jphp-runtime/src/php/runtime/memory/support/GapList.java