Check if a point is inside , outside or on the parabola | Function to check the point ; checking the equation of parabola with the given point ; Driver code
< ? php function checkpoint ( $ h , $ k , $ x , $ y , $ a ) { $ p = pow ( ( $ y - $ k ) , 2 ) - 4 * $ a * ( $ x - $ h ) ; return $ p ; } $ h = 0 ; $ k = 0 ; $ x = 2 ; $ y = 1 ; $ a = 4 ; if ( checkpoint ( $ h , $ k , $ x , $ y , $ a ) > 0 ) echo " Outside " ; else if ( checkpoint ( $ h , $ k , $ x , $ y , $ a ) == 0 ) echo " On ▁ the ▁ parabola " ; else echo " Inside " ; ? >