modify logical expression for php convention.