PHP Interview Questions Part II

16. What is meant my nl2br()

Ans: like


19. What are the reasons for selecting lamp(Linux, apache, mysql, php) instead of combination of other software programmes, servers and operating system?

Ans: All are Open-Source and are related internally

20. How can we encrypt and decrypt a data present in a mysqltable using mysql

Ans: AES_ENCRYPT() AES_DECRYPT()

21. How can we encrypt the username and password using php

Ans: md5() sha1()

22. What are the features and advantages of OBJECT ORIENTED PROGRAMMING

Ans: Encapsulation and inheritence and ploymorphism

23. What are the differences between PROCEDURE ORIENTED LANGUAGES AND OBJECT ORIENTED LANGUAGES

Ans: procedural programming executes serially, and OOPS - memory is
alloted when the objects are created. no step by step execution.


24. what is the use of friend function (many say it as array)

Ans: we can use that function any where in the module not necessary to
create an instance of class.


26. What are the different types of errors in php

Ans: Fatal errors, Parse errors......

27. What is the functionality of the function strstr and stristr

Ans: strstr -- Find first occurrence of a string
stristr -- Case-insensitive strstr()


28. What are the differences between PHP 3 and PHP 4 and PHP 5

Ans: Every time they will include some new functionalities and some new
functions.....

29. How can we convert asp pages to php pages

Ans: There is a saperate tool for that

30. What is the functionality of the function htmlentities

Ans: htmlentities -- Convert all applicable characters to HTML entities

31. How can we get second of the current time using date function?

Ans: today = date("H:i:s");

33. What is meant by urlencode and urldocode

Ans: to encode urls, returns a string in which all non-alphanumeric
characters.

0 comments:

Post a Comment