Added ternary to demo PHP code