Showing posts with label Difference between. Show all posts
Showing posts with label Difference between. Show all posts

Monday 19 January 2015

Difference between SSL and HTTPS


Difference between SSL and HTTPS

Today, We all do the online shopping, money transfer, different types of recharge (Mobile/DTH etc) and login to bank website etc. These all action are done on web browser (like google chrome, mozilla, internet explorer etc). When we are doing online stuff, its very necesary that the website we are using is 100% secure, So you must do online stuff when your website page start with https, like https://gmail.com.

There are two protocols (SSL and Https) which secure our online transactions. SSL and HTTPS can be seen as complementary rather than competing. Both protocols (SSL and HTTPS) works for security at different leavel and have been approved by the Internet Engineering Task Force (IETF) as a standard.


Following are main Difference between SSL and HTTPS:


S.No SSL HTTPS
1 Full form of Secure Sockets Layer Full form of HTTPS is HyperText Transfer Protocol Secure.
2 SSL is Transport layer protocol. HTTPS is application layer protocol.
3 Encryption by SSL is application-independent. Encryption by SSL is application-dependent.
4 Cryptographic Protocol that is used to provide security for the communications over the internet. HTTPS is a protocol created by combining HTTP and SSL/TLS to provide security for the communications over the internet.
5 HTTPS is less flexible as compare to HTTPS HTTPS is more flexible







Monday 5 January 2015

Difference between Notice and warning and fatal error

Difference between Notice and warning and fatal error


Notice
  • A notice is an advisory message like "You probably shouldn't be doing what you're doing"
  • Execution of the script is not halted
  • Example
    echo $undefinedVariable;



Warning
  • A warning is a message like "You are doing something wrong and it is very likely to cause errors in the future, so please fix it." Execution of the script is not halted;
  • Example
    echo 1/0;



Fatal Error
  • Fatal run-time errors
  • Execution of the script is not halted
  • Example  
    require_once "notexistfile.php"

Saturday 20 December 2014

Difference between overloading and overriding in php with Example

Difference between overloading and overriding in php with Example


Overloading: In Real world, overloading means assigning some extra stuff to someone. As as in real world Overloading in PHP means calling extra functions.
Example of Overloading:
class testclass {
    public $_data;
    public function __get($name) {
        echo "Getting '$name'\n ";
        return $this->data[$name];
    }
}

$obj = new testclass();
/** Magic method Example * */
echo $obj->a; //As __get function called - Overloading example 2
/** Magic method Example * */ 

We can do overloading with magic methods and are following:
__construct(), __destruct(), __call(), __callStatic(), __get(), __set(), __isset(), __unset(), __sleep(), __wakeup(), __toString(), __invoke(), __set_state(), __clone() and __debugInfo()



Overriding: In Real world, Overriding means changing the parental behaviour in Child. As as in real world Overriding in PHP means calling of child function instead of parent function, both class's function have same name.
Example of Overriding:
class parentclass {
    function name() {
        return 'Parent';
    }
}

class childclass extends parentclass {
    function name() {
        return 'Child';
    }
}

$obj = new childclass();
echo $obj->name();//It called child function instead of parent parent function - Overriding Example


Thursday 9 October 2014

What is difference between natcasesort and sort?

What is difference between natcasesort and sort?


Question: What is difference between natcasesort and sort?
$arrayData1 = $arrayData2 = array('Test1', 'Test10', 'Test20', 'Test30', 'Test00', 'Test5');

sort($arrayData1);
echo "Standard sorting\n";
print_r($arrayData1);

natcasesort($arrayData2);
echo "\nnatcasesort Sorting\n";
print_r($arrayData2);

Output
Standard sorting
Array
(
    [0] => Test00
    [1] => Test1
    [2] => Test10
    [3] => Test20
    [4] => Test30
    [5] => Test5
)

natcasesort Sorting
Array
(
    [4] => Test00
    [0] => Test1
    [5] => Test5
    [1] => Test10
    [2] => Test20
    [3] => Test30
)

Friday 3 October 2014

Difference Between Hadoop and Big-Data

Difference Between Hadoop and Big-Data


Big data is a term, everything where you stored lots of data which is unstructured is bigdata. For example computer hard drive where we put movies, songs, excel file, doc file, application file and reports in just one folder.

Big data is simply the large sets of data that business person and other parties put together to serve specific goals and operations. Big data can include many different kinds of data in many different kinds of formats.

Big data is just a storage system where we stored millons of millions files.




Hadoop: It is open-source software framework for storage and large-scale processing of data-sets based on mapReduce. MapReduce splits big Data over several nodes in order to achieve a parallel computing.

Hadoop is software program which works on big data to provide you useful information.

Hadoop is just a software which filter the required information from tons of information.

Hadoop Interview Questions And Answers