Php Functions example
Your Output Goes Here. Click on execute or Ctrl + Enter to run your code
use pi value as global variable in your print the area of circle
use local variable and take input from user and print the nearest power of 3
multiply a value by 10 and return it to the caller
Global variable
local variable
Static variable
take input, a sequence of numbers from user and store it in a list or array
initialize a hash or dictionary with five key-value sets and print the second key value pair
print the data type of the initialzed variable
take float as input from user and convert it into integer and string then print it in respective manner
take a string and convert it into list or array by using the spaces in the string as delimiter
print whether a given number is odd and also a multiple of nine
print the grade of person using the following conditions
find maxima or minima of a quadratic equation
find whether the given year is leap year or not with the following conditions
find derivative and integral of polynomial equation
In physics, contact between objects during a collision leads to loss of force as no medium is perfect
check whether a given number is in a goemetric progression or not for a given initial value and factor
append two files in another file
open a csv file and print only the second column in the file
open a text file and print the nth line in text file if nth line does not exist print no data
writing a function to find whether a given number is armstrong number or not
find the factorial of a number using function
writing a function to find gcd of two numbers
enter a number to generate sequence of primes that are exactly at absoute difference of 1 with powers of two
extract the mail addresses in the given string using regular expression
find the sum of the numbers in a alphanumeric string
replace all the patterns like '[!*]' using regular expression
find the total occurences of a symbol in string using reqular expressions
build a class and store the data of the mobile phones with screen size,ram,company and processor along with Constructor and function to estimate cost of phone based on conditions
use the mobile phone class as parent and build the accessory class for a shop for biling purpose
use Function Overriding in a class
use session variables and start a session
use exception handling and prevent the calculation of roots of a quadratic equation if root are complex
use Exception handling and catch divided by zero, divided by power of 2 exceptions
Your Output Goes Here. Click on execute or Ctrl + Enter to run your code