Showing posts with label differences. Show all posts
Showing posts with label differences. Show all posts

Saturday, April 3, 2010

difference between Reply-to and Return-path in mail header

Answer

Reply-to: Reply-to is where to delivery the reply of the mail.


Return-path: Return path is when there is a mail delivery failure occurs then where to delivery the failure notification.

Friday, April 2, 2010

differentiate __sleep and __wakeup?

Answer


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

Thursday, April 1, 2010

htmlentities and htmlspecialchars diff

what is the difference between htmlentities and htmlspecialchars?

htmlentities — Convert all applicable characters to HTML entities

htmlspecialchars — Convert special characters to HTML entities

$str = "PHP interview questions and answers collection is good";

echo htmlentities($str);

// Outputs: PHP interview questions and answers collection is <b>bold</b>

$new = htmlspecialchars("Test", ENT_QUOTES);
echo
$new; // <a href='test'>Test</a>

Difference between include_once and require_once in php

Include_once will include a file only one time. If we call it again it will not include.

The difference is reqire_once will through a fatal error if you include a same file again