Priti's Technical Corner

May 11, 2009

PHP Interview Questions

Filed under: PHP — Tags: , , , , , — pritisolanki @ 5:20 am

Question : What is WSDL?
Answer : WSDL document defines services as collections of network endpoints.Types ,element,Operations,port type,Binding,port,Service are the element involved to defined WSDL document.Question : what memory_get_usage function do?
Answer   :Return the amount of memory assigned to your PHP script.

Question: Where call_user_func helps?
call_user_func — Call a user function given by the first parameter
function barber($type)
echo “You wanted a $type haircut, no problem”;
call_user_func(‘barber’, “mushroom”);
call_user_func(‘barber’, “shave”);

Question: Is it possible to define constant in interface?
Answer : Yes, interface constant exactly works like class constants.

: what is $php_errormsg?
Answer :$php_errormsg store the previous error message generated by PHP.This variable will only be available within the scope in which the error occurred.



  1. Hi,
    Here are few more questions.

    1) how to delete an element from an array in php
    Ans. unset($array[$element_index]) and then use $array = array_values($array)

    2) how to make sure array exists in php
    Ans. is_array($array)

    3) explain overloading concept in php
    Ans. look in php manual for function __get() and function __set()

    4) how to use php in java and/or java in php.
    Ans. php in java servlet can be used using SAPI module. And java servlet in php can be used using java plugins. For second part, one needs to set java.path and other variables in php.ini

    Comment by milan — August 31, 2009 @ 5:32 pm


    Comment by pritisolanki — October 5, 2009 @ 1:40 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: