Program for Area And Perimeter Of Rectangle | Utility function ; Driver program
< ? php function areaRectangle ( $ a , $ b ) { $ area = $ a * $ b ; return $ area ; } function perimeterRectangle ( $ a , $ b ) { $ perimeter = 2 * ( $ a + $ b ) ; return $ perimeter ; } $ a = 5 ; $ b = 6 ; echo ( " Area ▁ = ▁ " ) ; echo ( areaRectangle ( $ a , $ b ) ) ; echo ( " STRNEWLINE " ) ; echo ( " Perimeter ▁ = ▁ " ) ; echo ( perimeterRectangle ( $ a , $ b ) ) ; ? >