Program to check if three points are collinear | function to check if point collinear or not ; Driver Code
< ? php function collinear ( $ x1 , $ y1 , $ x2 , $ y2 , $ x3 , $ y3 ) { if ( ( $ y3 - $ y2 ) * ( $ x2 - $ x1 ) == ( $ y2 - $ y1 ) * ( $ x3 - $ x2 ) ) echo ( " Yes " ) ; else echo ( " No " ) ; } $ x1 = 1 ; $ x2 = 1 ; $ x3 = 0 ; $ y1 = 1 ; $ y2 = 6 ; $ y3 = 9 ; collinear ( $ x1 , $ y1 , $ x2 , $ y2 , $ x3 , $ y3 ) ; ? >