Stable Marriage Problem PHP Class