PHP Function References

please click here for more wordpress cource

PHP has a vast collection of built-in functions that can be used to perform various tasks. Here are some commonly used PHP function references:

  1. echo() – Used to output one or more strings or variables to the screen.
  2. print() – Outputs a string.
  3. strlen() – Returns the length of a string.
  4. strtoupper() – Converts a string to uppercase.
  5. strtolower() – Converts a string to lowercase.
  6. substr() – Returns a portion of a string.
  7. explode() – Splits a string into an array.
  8. implode() – Joins elements of an array into a string.
  9. array() – Creates an array.
  10. count() – Counts the number of elements in an array.
  11. isset() – Checks if a variable is set and not null.
  12. empty() – Checks if a variable is empty.
  13. array_push() – Adds one or more elements to the end of an array.
  14. array_pop() – Removes the last element from an array.
  15. array_shift() – Removes the first element from an array.
  16. array_unshift() – Adds one or more elements to the beginning of an array.
  17. array_merge() – Merges two or more arrays.
  18. array_search() – Searches an array for a given value and returns the corresponding key if successful.
  19. sort() – Sorts an array in ascending order.
  20. rsort() – Sorts an array in descending order.
  21. array_reverse() – Reverses the order of the elements in an array.
  22. rand() – Generates a random number.
  23. time() – Returns the current Unix timestamp.
  24. date() – Formats a date and/or time.
  25. file_get_contents() – Reads the contents of a file into a string.
  26. file_put_contents() – Writes a string to a file.
  27. fopen() – Opens a file or URL.
  28. fclose() – Closes an open file pointer.
  29. fwrite() – Writes to an open file pointer.
  30. fread() – Reads from an open file pointer.

You may also like...

Popular Posts

Leave a Reply

Your email address will not be published. Required fields are marked *