Recent PHP interview Questions in HCL

1. mvc architecture
2. program to print first 10 prime nos.
3. program to print sum of digits
4. program to reverse the string without using strrev()
5. program to display the following pattern:    
6. jquery functions like live()
7. sql query to display 3rd highest salary
8. in php array, string and date functions
9. sql query to display empid, name, boss’ id and boss’ name from employee table having empid, name boss’ id,salary etc.
10. types of stylin

3.If i have two methods in a Service like insert() and Search() ,i need
to restrict users to use access only search() method and admin both the
methods? how?

4.Public Class Employee
public String Name
public int id
How do we cache the above?
5.Serialization ?How we serialize a class and objects?
7.How to increase Web app Performance?
8.Xml files usage in u r projects?when and where did u use it?
9.Classic asp?
10.String and StringBuilder
11.sp advantage over sqlcommands
12.javascript functions?
13.sql execution Plan?
14.sqlqueryprofile Tool?

Hello recently HCL is hiring PHP people for their client(YAHOO).When i
got a interview call i googled a lot for PHP HCL INTERVIEW QUESTIONS but
I got nothing.Hope this blog will help some of the people like me.Iam
not providing answers here as you can google it.If somebody need
answers plz comment.Here are the interview questions which myself and
some of my friends faced in HCL Bangalore location.They will ask the
same questions to every one.


1.what is ajax?
2.different states in ajax?
3.different response types in ajax?
4.what is json? to parse json response data? do u place two div elements side by side? do u place two images one on another?
8.stored procedures?
9.diff b/w echo and print?
10.”” how to get the string b/w two dots(.) using php string functions?
11.what is shift operator?
12.what is array_shift?
13 .what is array_unshift?
$array1 = (a=>abc,a=>bc,a=>ac,a=>abcd);
$array2 = (azaad,aariz);
what ia the o/p of array_combine()? to override inline css with external css? will you validate input data in javascript and in php?(cross site scripting)
17.echo print(‘hello’); what is the o/p?
18.CSS sprite technique?
19.document types in html?
20.Difference between HTML and DHTML?
21.How willa create the following layout using div’s?
22.what is the difference between padding and margin?
23.I have two iframes in a page how can I pass variables of one frame to another using javascript?
24.Explain singleton pattern?
25.What is Encapsulation?How will you achieve that in PHP?
26 What is load balencing? How will you do it?
27.How will you pass sessions from one server to another?
28.What is opcode & opcode cache?
29.How will you fix cross browser issues for CSS and JAVASCRIPT?
30.Is there any place in your project where the application is running slow?How will you fix that?
31.What is CSS sprite technique?
32.AJAX states?
33.In which variable you will get the response states?
34.What are environment variables.
35.Difference between PHP4 and PHP5?
36.How will you improve the page performence in front-end(front-end caching)?
37.Diff between a div teg and a span tag?
38.Explain CSS box model?
39.What is cascading?
40.Separating a number from a string using javascript?
41.CSS hacks?
42.What are access specifiers in PHP?
43.Diffenrece between Abstract class and Interface?
44.What are the different mysql Engines?
45.What is a persistance cookie?
46.What is static keyword?
47.Different query optimization techniques?
48.Inheritance in Javascript?
49.Difference between visibility :hidden and display:none?
50.XHTML Rules?
51.How will you optimize php applications?
52.What are the properties of CSS “position” ?
53.Different types of joins in mysql?
54.How will you find whether your browser supports cookies using javascript?

How will you get student name and total marks of a first rank student?


one employee can take interview to any number of candidates.How will you get count of candidates an employee taken interview?