The biggest possible circle that can be inscribed in a rectangle | Function to find the area of the biggest circle ; the length and breadth cannot be negative ; area of the circle ; Driver code
< ? php function circlearea ( $ l , $ b ) { if ( $ l < 0 $ b < 0 ) return -1 ; if ( $ l < $ b ) return 3.14 * pow ( $ l / 2 , 2 ) ; else return 3.14 * pow ( $ b / 2 , 2 ) ; } $ l = 4 ; $ b = 8 ; echo circlearea ( $ l , $ b ) . " STRNEWLINE " ; ? >