registration
Are you an Employer?

Php interview questions & Answers

List of Topics

Php Interview questions

  • What's Php?

    The PHP Hypertext Preprocessor is a programming language that allows web developers to create dynamic content that interacts with databases. PHP is basically used for developing web based software applications.

  • What Is A Session?

  • What Is Meant By Pear In Php?

  • How Can We Know The Number Of Days Between Two Given Dates Using Php?

  • How Can We Repair A Mysql Table?

  • What Is The Difference Between $message And $$message?

  • What Is A Persistent Cookie?

  • How Do You Define A Constant?

  • What Are The Differences Between Require And Include, Include_once?

  • What Is Meant By Urlencode And Urldecode?

  • How To Get The Uploaded File Information In The Receiving Script?

  • What Is The Difference Between Mysql_fetch_object And Mysql_fetch_array?

  • How Can I Execute A Php Script Using Command Line?

  • I Am Trying To Assign A Variable The Value Of 0123, But It Keeps Coming Up With A Different Number, What's The Problem?

  • Would I Use Print "$a Dollars" Or "{$a} Dollars" To Print Out The Amount Of Dollars In This Example?

  • What Are The Different Tables Present In Mysql? Which Type Of Table Is Generated When We Are Creating A Table In The Following Syntax: Create Table Employee(eno Int(2),ename Varchar(10))?

  • How To Create A Table?

  • How Can We Encrypt The Username And Password Using Php?

  • How Do You Pass A Variable By Value?

  • What Is The Functionality Of The Functions Strstr() And Stristr()?

  • When Are You Supposed To Use Endif To End The Conditional Statement?

  • How Can We Send Mail Using Javascript?

  • What Is The Functionality Of The Function Strstr And Stristr?

  • What Is The Difference Between Ereg_replace() And Eregi_replace()?

  • How Do I Find Out The Number Of Parameters Passed Into Function9?

  • What Is The Purpose Of The Following Files Having Extensions: Frm, Myd, And Myi? What These Files Contain?

  • If The Variable $a Is Equal To 5 And Variable $b Is Equal To Character A, What's The Value Of $$b?

  • How To Protect Special Characters In Query String?

  • Are Objects Passed By Value Or By Reference?

  • What Are The Differences Between Drop A Table And Truncate A Table?

  • What Are The Differences Between Get And Post Methods In Form Submitting, Give The Case Where We Can Use Get And We Can Use Post Methods?

  • How Do You Call A Constructor For A Parent Class?

  • What Are The Different Types Of Errors In Php?

  • What's The Special Meaning Of __sleep And __wakeup?

  • How Can We Submit A Form Without A Submit Button?

  • Would You Initialize Your Strings With Single Quotes Or Double Quotes?

  • What Is The Difference Between The Functions Unlink And Unset?

  • How Come The Code Works, But Doesn't For Two-dimensional Array Of Mine?

  • How Can We Register The Variables Into A Session?

  • What Is The Difference Between Characters \023 And \x23?

  • How Can We Submit Form Without A Submit Button?

  • How Can We Create A Database Using Php And Mysql?

  • How Many Ways We Can Retrieve The Date In Result Set Of Mysql Using Php?

  • How Many Ways Can We Get The Value Of Current Session Id?

  • Can We Use Include ("abc.php") Two Times In A Php Page "makeit.php"?

  • What's The Difference Between Include And Require?

  • Explain The Ternary Conditional Operator In Php?

  • What's The Difference Between Htmlentities() And Htmlspecialchars()?

  • How To Store The Uploaded File To The Final Location?

  • What Is The Difference Between Reply-to And Return-path In The Headers Of A Mail Function?

  • So If Md5() Generates The Most Secure Hash, Why Would You Ever Use The Less Secure Crc32() And Sha1()?

  • How Can We Destroy The Session, How Can We Unset The Variable Of A Session?

  • What Type Of Headers Have To Be Added In The Mail Function To Attach A File?

  • List Out Different Arguments In Php Header Function?

  • What Are The Different Functions In Sorting An Array?

  • How Can We Know The Count / Number Of Elements Of An Array?

  • How Many Ways I Can Redirect A Php Page?

  • How Many Ways We Can Pass The Variable Through The Navigation Between The Pages?

  • What Is The Maximum Length Of A Table Name, A Database Name, Or A Field Name In Mysql?

  • How Many Values Can The Set Function Of Mysql Take?

  • What Are The Other Commands To Know The Structure Of A Table Using Mysql Commands Except Explain Command?

  • How Can We Find The Number Of Rows In A Table Using Mysql?

  • What Changes I Have To Do In Php.ini File For File Uploading?

  • What's The Difference Between Md5(), Crc32() And Sha1() Crypto On Php?

  • How Can We Find The Number Of Rows In A Result Set Using Php?

  • What Is The Default Session Time In Php And How Can I Change It?

  • How Many Ways We Can We Find The Current Date Using Mysql?

  • How Many Ways We Can Give The Output To A Browser?

  • Please Give A Regular Expression (preferably Perl/preg Style), Which Can Be Used To Identify The Url From Within A Html Link Tag?

  • Give The Syntax Of Grant Commands?

  • What Are The Different Ways To Login To A Remote Server? Explain The Means, Advantages And Disadvantages?

  • Give The Syntax Of Revoke Commands?

  • When Viewing An Html Page In A Browser, The Browser Often Keeps This Page In Its Cache. What Can Be Possible Advantages/disadvantages Of Page Caching? How Can You Prevent Caching Of A Certain Page (please Give Several Alternate Solutions)?

  • When You Want To Show Some Part Of A Text Displayed On An Html Page In Red Font Color? What Different Possibilities Are There To Do This? What Are The Advantages/disadvantages Of These Methods?

  • What Is The Difference Between Char And Varchar Data Types?

  • How Can We Encrypt And Decrypt A Data Present In A Mysql Table Using Mysql?

  • How Can We Change The Name Of A Column Of A Table?

  • How Can Increase The Performance Of Mysql Select Query?

  • Will Comparison Of String "10" And Integer 11 Work In Php?

  • What Type Of Inheritance That Php Supports?

  • What Is The Functionality Of Md5 Function In Php?

  • How Can I Load Data From A Text File Into A Table?

  • How Can We Know The Number Of Days Between Two Given Dates Using Mysql?

  • How Can We Change The Data Type Of A Column Of A Table?

  • How Can We Know That A Session Is Started Or Not?

  • What Are The Advantages And Disadvantages Of Cascade Style Sheets?

  • If We Login More Than One Browser Windows At The Same Time With Same User And After That We Close One Window, Then Is The Session Is Exist To Other Windows Or Not? And If Yes Then Why? If No Then Why?

  • What's The Difference Between Accessing A Class Method Via -> And Via ::?

  • What Are The Mysql Database Files Stored In System ?

  • Explain Normalization Concept?

  • What Is The Difference Between Php4 And Php5?

  • What Are The Advantages Of Stored Procedures, Triggers, Indexes?

  • What Are The Difference Between Abstract Class And Interface?

  • Can We Use Include(abc.php) Two Times In A Php Page Makeit.php?

  • How Can I Make A Script That Can Be Bilingual (supports English, German)?

  • What Is The Maximum Size Of A File That Can Be Uploaded Using Php And How Can We Change This?

  • How Can We Get Second Of The Current Time Using Date Function?

  • What Are The Differences Between Mysql_fetch_array(), Mysql_fetch_object(), Mysql_fetch_row()?

  • What Are The Features And Advantages Of Object Oriented Programming?

  • What Are The Reasons For Selecting Lamp (linux, Apache, Mysql, Php) Instead Of Combination Of Other Software Programs, Servers And Operating Systems?

  • What Is Meant By Nl2br()?

  • What Are The Current Versions Of Apache, Php, And Mysql?

  • How Can We Encrypt And Decrypt A Data Presented In A Table Using Mysql?

  • How Can We Destroy The Cookie?

  • How Can I Retrieve Values From One Database Server And Store Them In Other Database Server Using Php?

  • How Can We Submit From Without A Submit Button?

  • Who Is The Father Of Php And What Is The Current Version Of Php And Mysql?

  • Tools Used For Drawing Er Diagrams?

  • In How Many Ways We Can Retrieve Data In The Result Set Of Mysql Using Php?

  • What Are The Functions For Imap?

  • Check If A Variable Is An Integer In Javascript ?

  • What Are Encryption Functions In Php?

  • What Types Of Images That Php Supports ?

  • What Is The Difference Between Htmlentities() And Htmlspecialchars()?

  • How To Reset/destroy A Cookie ?

  • What Is The Functionality Of The Function Htmlentities?

  • How Can We Get The Properties (size, Type, Width, Height) Of An Image Using Php Image Functions?

  • How To Set Cookies?

  • How Can We Increase The Execution Time Of A Php Script?

  • In How Many Ways We Can Retrieve Data In The Result Set Of Mysql Using Php?

  • Who Is The Father Of Php And What Is The Current Version Of Php And Mysql?

  • What's The Difference Between Include And Require?

  • Steps For The Payment Gateway Processing?

  • Can We Use Include(abc.php) Two Times In A Php Page Makeit.php?

  • How Many Ways We Can Give The Output To A Browser?

  • What Are The Different Ways To Login To A Remote Server? Explain The Means, Advantages And Disadvantages?

  • What Is Meant By Mime?

  • What Is The Difference Between Group By And Order By In Sql?

  • Who Is The Father Of Php And Explain The Changes In Php Versions?

  • Which Method Do You Follow To Get A Record From A Million Records? (searching Not From Database, From An Array In Php)?

  • Are Namespaces Are There In Javascript?

  • What Is 'float' Property In Css?

  • What Are The Advantages/disadvantages Of Mysql And Php?

  • What Are The File Upload Settings In Configuration File?

  • How To Uploaded Files To A Table?

  • How To Create A Table To Store Files?

  • Why Do You Need To Filter Out Empty Files?

  • How To Move Uploaded Files To Permanent Directory?

  • How To Process The Uploaded Files?

  • How Many Escape Sequences Are Recognized In Single-quoted Strings?

  • What Are The Special Characters You Need To Escape In Double-quoted Stings?

  • How Many Escape Sequences Are Recognized In Double-quoted Strings?

  • How To Include Variables In Double-quoted Strings?

  • How To Access A Specific Character In A String?

  • How To Assigning A New Character In A String?

  • How To Get The Number Of Characters In A String?

  • How To Remove The New Line Character From The End Of A Text Line?

  • How To Remove Leading And Trailing Spaces From User Input Values?

  • How To Take A Substring From A Given String?

  • How To Replace A Substring In A Given String?

  • How To Convert Strings To Upper Or Lower Cases?

  • How To Convert The First Character To Upper Case?

  • How To Convert Strings In Hex Format?

  • How To Generate A Character From An Ascii Value?

  • How To Convert A Character To An Ascii Value?

  • How To Join Multiple Strings Into A Single String?

  • What Is An Array In Php?

  • How To Test If A Variable Is An Array?

  • How To Retrieve Values Out Of An Array?

  • How Values In Arrays Are Indexed?

  • How The Values Are Ordered In An Array?

  • How To Get The Total Number Of Values In An Array?

  • How To Find A Specific Value In An Array?

  • How To Merge Values Of Two Arrays Into A Single Array?

  • How To Randomly Retrieve A Value From An Array?

  • How To Pad An Array With The Same Value Multiple Times?

  • How To Join Multiple Strings Stored In An Array Into A Single String?

  • How To Define A User Function?

  • How To Invoke A User Function?

  • How To Return A Value Back To The Function Caller?

  • How To Pass An Argument To A Function?

  • How Variables Are Passed Through Arguments?

  • How To Pass Variables By References?

  • Can You Define An Argument As A Reference Type?

  • Can You Pass An Array Into A Function?

  • How Arrays Are Passed Through Arguments?

  • Can You Define An Array Argument As A Reference Type?

  • What Is The Scope Of A Variable Defined In A Function?

  • What Is The Scope Of A Variable Defined Outside A Function?

  • How To Access A Global Variable Inside A Function?

  • How To Specify Argument Default Values?

  • How To Define A Function With Any Number Of Arguments?

  • How To Read The Entire File Into A Single String?

  • How To Open A File For Reading?

  • How To Open A File For Writing?

  • How To Read One Character From A File?

  • How To Read A File In Binary Mode?

  • How To Open Standard Output As A File Handle?

  • How To Create A Directory?

  • How To Remove An Empty Directory?

  • How To Remove A File?

  • How To Copy A File?

  • How To Get The Directory Name Out Of A File Path Name?

  • How To Break A File Path Name Into Parts?

  • How To Create A Web Form?

  • What Are Form Input Html Tags?

  • How To Generate A Form?

  • Where Is The Submitted Form Data Stored?

  • What Happens If An Expected Input Field Was Not Submitted?

  • How To Avoid The Undefined Index Error?

  • How To List All Values Of Submitted Fields?

  • How To Retrieve The Original Query String?

  • How To Support Multiple-page Forms?

  • What Is A Cookie?

  • How To Send A Cookie To The Browser?

  • How To Receive A Cookie From The Browser?

  • How Cookies Are Transported From Servers To Browsers?

  • How Cookies Are Transported From Browsers To Servers?

  • Where Are The Persistent Cookies Stored On Your Computer?

  • How To Delete Cookie Files On Your Computer?

  • How Does Firefox Manage Cookies?

  • What Are The Options To Transfer Session Ids?

  • Is It More Secure To Use Cookies To Transfer Session Ids?

  • What Is The Timeout Period On Session Values?

  • How To Set Session.gc_maxlifetime Properly?

  • How To Set Session.gc_divisor Properly?

  • How To Remove Values Saved In The Current Session?

  • How To Close A Session Properly?

  • What Is Session_register()?

  • What Do You Need To Connect Php To Mysql?

  • How To Connect To Mysql From A Php Script?

  • How To Run A Sql Statement?

  • How To Get The Number Of Rows Selected Or Affected By A Sql Statement?

  • What Is A Result Set Object?

  • What Is File Upload?

 

Top