Check if a line passes through the origin | PHP program to find if line passing through two coordinates also passes through origin or not ; Driver code
< ? php function checkOrigin ( $ x1 , $ y1 , $ x2 , $ y2 ) { return ( $ x1 * ( $ y2 - $ y1 ) == $ y1 * ( $ x2 - $ x1 ) ) ; } if ( checkOrigin ( 1 , 28 , 2 , 56 ) == true ) echo ( " Yes " ) ; else echo ( " No " ) ; ? >