Thursday, August 11, 2016

Difference between === v/s == and != v/s !== in PHP

The most important concept in php language is that when we are using = = sign for checking value are equal . In php i am showing you how it work by an examples
Examples:-

Output:-                                                                                                                                        


Now i am going to show === how work by an  examples then conclude what is difference between
Examples:-                                                                                                                                         

Output:-                                                                                                                            


When we are using == then condition is checking on the basis of  value not data type but in case of === condition is checking value as well as data type. Same concept in case of !=(not equl) it  check condition on the basis of only value not data type and ! ==  it check condition on the basis of value as well as data type.                                                                                                                                    





No comments:

Post a Comment