Program for factorial of a number | function to find factorial of given number ; Driver Code
< ? php function factorial ( $ n ) { if ( $ n == 0 ) return 1 ; return $ n * factorial ( $ n - 1 ) ; } $ num = 5 ; echo " Factorial ▁ of ▁ " , $ num , " ▁ is ▁ " , factorial ( $ num ) ; ? >