What's The Special Meaning Of __sleep And __wakeup?

__sleep returns the array of all the variables than need to be saved, while __wakeup retrieves them.

How Many Ways I Can Redirect A Php Page?

Here are the possible ways of php page redirection.

  1. Using Java script:
    '; echo 'window.location.href="'.$filename.'";'; echo ''; echo ''; echo ''; echo ''; } }
  2. Using php function: header

How many ways we can pass the variable through the navigation between the pages?

The following are the way to pass variable value to next page:

  1. By using session.
  2. By using cookie .
  3. By using hidden form field.

What is the maximum length of a table name, a database name, or a field name in mysql?

  • Database name: 64 characters
  • Table name: 64 characters
  • Column name: 64 characters

What is difference in =, == and === in PHP?

  • = is the assignment operator
  • == is the comparison operator (checks if two variables have equal values)
  • === is the identical comparison operator (checks if two variables have equal values and are of the same type).
$a = $b Assign Sets $a to be equal to $b. $a == $b Equal TRUE if $a is equal to $b. $a === $b Identical TRUE if $a is equal to $b, and they are of the same type. (introduced in PHP 4)

For more detail about == and === read doc from php.net


Back to Top