better php block controls handling