PHP test of simple DP problem