Check if it is possible to move from ( a , 0 ) to ( b , 0 ) with given jumps | Function to check if it is possible ; Driver code ; function call
< ? php function Move ( $ a , $ x , $ b ) { if ( ( ( ( $ b - $ a ) % $ x == 0 ) || ( ( $ b - $ a - 1 ) % $ x == 0 ) && $ a + 1 != $ b ) && $ b >= $ a ) return true ; return false ; } $ a = 3 ; $ x = 2 ; $ b = 7 ; if ( Move ( $ a , $ x , $ b ) ) echo " Yes " ; else echo " No " ; ? >