Add two numbers using ++ and / or | Returns value of x + y without using + ; If y is positive , y times add 1 to x ; If y is negative , y times subtract 1 from x ; Driver Code
< ? php function add ( $ x , $ y ) { while ( $ y > 0 && $ y -- ) $ x ++ ; while ( $ y < 0 && $ y ++ ) $ x -- ; return $ x ; } echo add ( 43 , 23 ) , " STRNEWLINE " ; echo add ( 43 , -23 ) , " STRNEWLINE " ; ? >