PHP Programming Language

Get Current Version Of PHP

You can use a text editor like Sublime or Notepa++. Dont use word editor. Enter the following code in the editor. Save it as file_name.php (For eg., version.php). Upload the file to the web server and run it in a web server. (hostname/file_name.php)

   

Email validation in PHP

Email validation is a part of validation in PHP. eregi function is helpful for checking email validation using PHP. We can check the email is added in a proper email format. You can enter any email address and can check the email is valid or not. This tutorial is helpful for knowing more about PHP form validation.

   

explode and implode function in PHP

explode and implode function in PHP. explode function in PHP split the string into an array by using the separator. The separator cannot be blank.

     

What is PHP?

PHP is a web programming language used to develop dynamic web applications. The full form of PHP stands for Hypertext Preprocessor. PHP is a server-side scripting programming language. That means PHP scripts execute only in the server. It is open-source software. It is free to use and download.

     

What is the differene between require(), require_once(), include() and include_once()

All these functions are used to include a file into another file. require() function includes a file and evaluates it. require_once() includes the file if and only if is not added before. require_once() includes the file if and only if is not added before. require_once() is more recommended than require() function.

     

What are Arrays in PHP?

Arrays are used to store multiple values under a common name. An array is a special variable that can store multiple values. array() is used to create an empty array. Suppose if you want to initialize a variable as an empty array, you can use it like this.

     

What are sessions in PHP?

The session is a superglobal variable and it is an alternative way to store data across multiple pages or it preserve data across subsequent HTTP requests. The session can be defined as a method to store information on the server, which can be used in the future.

     

How to Get current version of PHP?

How to Get current version of PHP. You can use a text editor like Sublime or Notepa++. Dont use word editor. Save it as file_name.php (For eg., version.php). Upload the file to the web server and run it in a web server.

 

What are the different functions in PHP for sorting an array?

Sort functions in PHP are used to sort elements in an array in ascending order or descending order. sort functions in PHP. sort(): Sort the elements in an array using ascending order. rsort(): Sort the elements in an array using descending order.

   

What is the difference between GET and POST?

GET and POST are used to send data from one page to the other page. Or it can be say that GET and POST is used to send data from client server to web server. GET has restriction in data size to send the data. But POST has no restriction in data size to send. The GET method transfers the data using HTTP header, whereas POST method transfer data using HTTP header.

   

PHP Arrays

An array stores value under a common name. An array is a variable that can hold more than one value at a time. In PHP, array() function is used to create the array. Arrays in PHP can be divided into three. Indexed Arrays, Associative arrays and Multidimensional Arrays.

       

PHP Loops

Instead of writing the same code several times, you can use loops. PHP Loops are used to execute the code again and again as long as the certain condition becomes true. In PHP, we have the following loops- For loop, While loop, Do while loop and foreach loop.

       

PHP Functions - Return Values

To return a value, use the return statement.

   

Functions in PHP

Functions in PHP is divided into two. Built-in Functions and User-Defined Functions. PHP has over more than 1000+ inbuilt functions. It is possible to create your own user-defined functions in PHP. A function is a block of statements that will execute a task.

     

Top 10 PHP Interview Questions And Answers

Who is the father of PHP - Rasmus Lerdorf. How can we encrypt and decrypt a username and password using PHP? The function below performs encryption and decryption - ENCODE() DECODE(), AES_ENCRYT(), AES_DECRYPT(), DES_ENCRYPT(), DES_DECRYPT(), OLD_PASSWORD()

   

PHP Interview Questions and Answers

PHP Interview Questions and Answers

     

PHP Full Form

PHP stands for Hypertext Preprocessor and earlier it was abbreviated as Personal Home Page. It is a programming language widely used to build dynamic web applications. PHP is a server-side scripting language and it can encode with HTML to develop dynamic web applications.