Detect if two integers have opposite signs | Function to detect signs ; Driver Code
< ? php function oppositeSigns ( $ x , $ y ) { return ( ( $ x ^ $ y ) < 0 ) ; } $ x = 100 ; $ y = -100 ; if ( oppositeSigns ( $ x , $ y ) == true ) echo ( " Signs ▁ are ▁ opposite " ) ; else echo ( " Signs ▁ are ▁ not ▁ opposite " ) ; ? >