change return 0 when it's 1 in php