PHP INTERVIEWQUESTIONS PDF

Similar documents
Short notes on webpage programming languages

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

Web development... the server side (of the force)

Ficha técnica de curso Código: IFCPR190b. Learning PHP, MySql and JavaScript

PHP Tutorial From beginner to master

Specialized Programme on Web Application Development using Open Source Tools

Web Development using PHP (WD_PHP) Duration 1.5 months

Application note: Connecting the to a Database

Facebook Twitter YouTube Google Plus Website

CrownPeak Playbook CrownPeak Hosting with PHP

INFORMATION BROCHURE Certificate Course in Web Design Using PHP/MySQL

PHP COOKIES, SESSIONS,

SQL Injection Attack Lab Using Collabtive

Apache Usage. Apache is used to serve static and dynamic content

Fachgebiet Technische Informatik, Joachim Zumbrägel

Specialized Programme on Web Application Development using Open Source Tools

RARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE CISY 233 INTRODUCTION TO PHP

Advanced Web Development SCOPE OF WEB DEVELOPMENT INDUSTRY

10CS73:Web Programming

E-Commerce: Designing And Creating An Online Store

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

A Brief Introduction to MySQL

Advanced Tornado TWENTYONE Advanced Tornado Accessing MySQL from Python LAB

Precondition for a good understanding: knowledge of a higher programming language (e.g. C, Java, Perl, Pascal, Basic,... ) basic knowledge of html

COURSE CONTENT FOR WINTER TRAINING ON Web Development using PHP & MySql

UQC103S1 UFCE Systems Development. uqc103s/ufce PHP-mySQL 1

Certified PHP Developer VS-1054

Outline Definition of Webserver HTTP Static is no fun Software SSL. Webserver. in a nutshell. Sebastian Hollizeck. June, the 4 th 2013

PHP Debugging. Draft: March 19, Christopher Vickery

PHP MySQL vs. Unity. Introduction. The PHP side. The Unity side

PHP Integration Kit. Version User Guide

ISI ACADEMY Web applications Programming Diploma using PHP& MySQL

Benchmarking and monitoring tools

Measured Performance of an Information System

C HAPTER E IGHTEEN T HE PGP, MAIL, AND CGI LIBRARIES. PGP Interface Library

Check list for web developers

Course Number: IAC-SOFT-WDAD Web Design and Application Development

Installation Instructions

by Pearson Education, Inc. All Rights Reserved.

Designing and Implementing an Online Bookstore Website

Pemrograman Web. 1. Pengenalan Web Server. M. Udin Harun Al Rasyid, S.Kom, Ph.D

Java Application Developer Certificate Program Competencies

IP Phone Services Configuration

URLs and HTTP. ICW Lecture 10 Tom Chothia

DBMS Project. COP Spring Final Submission Report

A Manual on use of ABCD central and VHL-Site modules for Developing Library Information Discovery and Information Literacy Tools

The C Programming Language course syllabus associate level

CPE111 COMPUTER EXPLORATION

C++ INTERVIEW QUESTIONS

Seamless Web Data Entry for SAS Applications D.J. Penix, Pinnacle Solutions, Indianapolis, IN

Lecture 11 Web Application Security (part 1)

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

Load testing with. WAPT Cloud. Quick Start Guide

Lab Experience 17. Programming Language Translation

LAMP [Linux. Apache. MySQL. PHP] Industrial Implementations Module Description

LICENSE4J LICENSE MANAGER USER GUIDE

Certified PHP/MySQL Web Developer Course

Performance Evaluation of PHP Frameworks (CakePHP and CodeIgniter) in relation to the Object-Relational Mapping, with respect to Load Testing

CSCI110 Exercise 4: Database - MySQL

Installation documentation for Ulteo Open Virtual Desktop

Ulteo Open Virtual Desktop Installation

SUBJECT CODE : 4074 PERIODS/WEEK : 4 PERIODS/ SEMESTER : 72 CREDIT : 4 TIME SCHEDULE UNIT TOPIC PERIODS 1. INTERNET FUNDAMENTALS & HTML Test 1

Equipment Room Database and Web-Based Inventory Management

Policy Guide Access Manager 3.1 SP5 January 2013

SQL is capable in manipulating relational data SQL is not good for many other tasks

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

Efficiency of Web Based SAX XML Distributed Processing

Web applications. Web security: web basics. HTTP requests. URLs. GET request. Myrto Arapinis School of Informatics University of Edinburgh

Table of Contents. Open-Xchange Authentication & Session Handling. 1.Introduction...3

Web Pages. Static Web Pages SHTML

Oracle Forms Services Secure Web.Show_Document() calls to Oracle Reports

How To Test Your Web Site On Wapt On A Pc Or Mac Or Mac (Or Mac) On A Mac Or Ipad Or Ipa (Or Ipa) On Pc Or Ipam (Or Pc Or Pc) On An Ip

Welcome to Collage (Draft v0.1)

Cyber Security Workshop Ethical Web Hacking

Instructor: Betty O Neil

IBM DB2 for Linux, UNIX, and Windows. Deploying IBM DB2 Express-C with PHP on Ubuntu Linux

SYSTEM DEVELOPMENT AND IMPLEMENTATION

Tableau Server Trusted Authentication

How to Create a Dynamic Webpage

IBM Unica emessage Version 8 Release 6 February 13, User's Guide

DIPLOMA IN WEBDEVELOPMENT

WLAN TRAFFIC GRAPHING APPLICATION USING SIMPLE NETWORK MANAGEMENT PROTOCOL *

INUVIKA OVD INSTALLING INUVIKA OVD ON RHEL 6

CSCI110: Examination information.

Cyber Security Challenge Australia 2014

Shop by Manufacturer Custom Module for Magento

Configuring Single Sign-on for WebVPN

Cache Configuration Reference

MySQL Quick Start Guide

PHP Authentication Schemes

How to Make the Client IP Address Available to the Back-end Server

Oracle Forms Services Secure Web.Show_Document() calls to Oracle Reports Server 6i

Implementation of Web Application Firewall

Introduction to Server-Side Programming. Charles Liu

Multimedia im Netz Online Multimedia Winter semester 2015/16. Tutorial 03 Major Subject

Chapter 13. Introduction to SQL Programming Techniques. Database Programming: Techniques and Issues. SQL Programming. Database applications

eattendance System for Academic Institutions

All MySQL and PHP training students receive a copy of Apress' Beginning PHP and MySQL 5: From Novice to Professional and other related courseware.

The full setup includes the server itself, the server control panel, Firebird Database Server, and three sample applications with source code.

Transcription:

PHP INTERVIEWQUESTIONS PDF Created By: Umar Farooque Khan 1

PHP Interview Questions For Fresher Q:-01. Full name of PHP? The full name of PHP is or PHP stand for "Hypertext Pre-processor". Q:-02. Who is the inventor of PHP? Rasmus Lerdorf (Born 22 November 1968) is a Greenlandic programmer with Canadian citizenship. Q:-03. Is PHP embed in HTML? Yes we can embed PHP in HTML. Q:-04. Current Version of PHP? Current version compatible with PHP 5.6.1. Q:-05. What Is PHP? PHP is a Hypertext Pre-processor, Which is widely used Open Source generalpurpose scripting language that is suited for Web development and can be embedded into HTML. Most of PHP syntax is based on C. They should make 2

PHP easy to pick up for Programmers. Generally PHP is used for Dynamic web application. Q:-06. What are the differences between GET and POST There are some difference between GET and POST method 1. When we use GET method requested data show in URL while when we use post method request data does not show in the URL. 2. Post method is more secure than get method. Q:-07. PHP is Compiler or Interpreter? PHP is an interpreted language Q:-08. What is full name of WAMP? WAMP: Windows Apache MySQL PHP. Q:-09. What is server? Server is the device (computers) which connects multiple devices or clients, it receives the client requests and gives response to them. Q:-10. What is the Difference between echo () and print (). Echo () and print () are not functions but language constructs in PHP. They are both used to deliver strings as output. The main difference is print deliver only one string as output while echo statement deliver one or more string as output. One difference is echo is faster than print. 3

Q:-11. What are the differences between require and include function? Both include and require function are used for including file into a current script. The main difference is, require function will produce fatal error and stop execution of script, as the name suggests this file is required for execution of this script. While include function will only produce Warning and continue the script. Q:-12. What are the differences between include and include_once? The include function is used in PHP when you want to include a file within the current script. It takes only one argument. Include_once function is same as include function except it will execute or include that file once. You can include same file many times in case of include while in case of include_once you can only once. Example You can put your include function within the loop but in case of include_once it will display only once. Q:-13.How we get IP address of client, previous reference page etc. By using $_SERVER['REMOTE_ADDR'],$_SERVER['HTTP_REFERER'] etc. 4

Q:-14. How many ways can we get the value of current session id? There are only one way to get value of current session id that is, session_id() function returns the current session id. Q:-15. How can we set and destroy the cookie in PHP? We use setcookies() function to set and destroy the cookies by using this function we can set and destroy the PHP cookies. For set cookies setcookie("user", "", time()+300); For destroy cookies setcookie("user", "", time()-300); Q:-16. What are the different functions in sorting an array? There are lot of function available for sorting an array like Sort(), arsort(), asort(), ksort(), natsort(), natcasesort(), rsort(), usort(), array_multisort(). Q:-17.What is the difference between $i-- and --$i? The $i-- is post decrement but --$i is pre decrement. Q:-18.How many types of arrays in PHP? There are three types of array in PHP Numeric Array 5

Associative Array Multidimensional array Q:-19. What is the use of header function in PHP? Header function allows sending a raw HTTP header to the client browser. The most common usages is simply redirecting a user to elsewhere i.e. to another URL. Example <?php echo"umar"; header("location:http://www.ptutorial.com/");?> Q:-20.What is the use of isset function? Isset() function determine whether a variable has been declared and loaded with a value by programmer. Return true if such a variable is passed to it. If not it return false. Q:-21. How can we register the variables into a session? We can register a simple variable into a session variable by using super global array $_session. $_SESSION['name'] = "user"; 6

Q:-22. What is the difference between --$variable and $variable--? --$variable is pre decrement and $variable post decrement. Q:-23.How much data we can upload into the database (By default)? By Default its size:- 2MB Q:-24.Who is the more secure method GET or POST? Post method is the secure method than GET. Q:-25.How can we get the browser properties using PHP? We can get the server properties by using $_SERVER super global array. $_SERVER['HTTP_USER_AGENT'] Q:-26. What is full name of WAMP, XAMP, and LAMP? WAMP: Windows Apache MySQL PHP XAMP: Extensible Apache MySQL PHP LAMP: Linux Apache MySQL PHP 7

Q:-27.What is difference between mysql_fetch_array() and mysql_fetch_row()? mysql_fetch_array() return entire row of mysql database into an indexed array. mysql_fetch_row() return entire row of mysql database into an associative arrary by default,you can specify the type of array mapping Q:-28. What is the use of @ symbol in front of mysql_connect()? The @ symbol inform mysql_connect() that if the database connection failed do nothing. Hence no system error displayed if the connection fails. Q:-29. Which function is used to connect the mysql database engine? Mysql_connect() is used to connect the database engine. Q:-30. Why use mysql_query() in php mysql? mysql_query is used to execute the mysql query. It accept a variable which was the previously loaded with the query string. Q:-31. What is the use of Perl in PHP? Perl is known as PHP extension and application repository. It provides the structured library to the PHP users also gives provision for package maintenance. 8

Q:-32. What are the different function in sorting an array? sort, arsort, asork, ksort, rsort, natsort, uksort, Array_multisort Etc. Q:-33. What is the use of in_array() function in PHP? In PHP in_array function is used to check whether given value exist in an array or not. Q:-34. How to set cookies in PHP? Setcookies ("name","php",time()+3600); Q:-35. What is the difference between PHP and java Script? The difference lies with the execution of the languages. PHP is a server side scripting language, that means PHP can t interact directly with the user. Whereas, Java Script is a client side scripting language, that is used to interact directly with the user. Q:-36. What is the use of "ksort " in PHP? ksort() function sort is used to sort an arrays key in reverse order. Q:-37. What is the use of mysql_real_escap_string()? It is used to escape special character in a string for use in an SQL statement. 9

Q:-38. What is the difference bitweeb mysql_fetch_array() and mysql_fetch_asoc()? mysql_fetch_array() function fetch a result row as an associative array while mysql_fetch_asoc() fetches an associative array, a numeric array, or both. Q:-39. How to redirect a web page in PHP? Header function is used to redirect from one webpage to another webpage Eg: header("location:uk.html"); Q:-40. How to redirect a web page after fixed time interval? Header function is used to redirect from one webpage to another webpage. Example: header( "refresh:7; url=uk.php" ); Q:-41. In PHP 5 class, what are the three different visibility keywords of a property of the method? Private - only the class itself may call a method or property Public any class may instantiate the class called the member and member function Protected - Only the class itself or inherited classes may call a method or property. Q:-42. What is the use of isset() function in PHP? It is used to determine whether a given variable is set or not. That means giving variable have a value or not. 10

Q:-43. In how many ways we can retrieve the data from MySql database using PHP? There are four ways to retrieve the data from database 1. Mysql_fetch_row() functiom 2. Mysql_fetch_array() functiom 3. Mysql_fetch_object() functiom 4. Mysql_fetch_assoc() functiom Q:-44. How can we get the second of the current time using date function? Date( s ); Q:-45. What is the difference between function unlink and unset? Unlink deletes the given file from the file system while unset makes a variable undefined means delete the variable value. Q:-46. How can we register the variable into the session? $_SESSION[ name ]="Umar"; Q:-47. How to set a page as a home in PHP based site? Index.php is the default name of the home page in a PHP based website. 11

Q:-48. What is use of count() function in PHP? Count function is used to count all the elements of an array. Q:-49. How do you define a constant in PHP? define("pi", "3.141592"); Q:-50. How to get the current session ID? Session_id() returns the session id for the current session. Q:-51. What is the value of $a in the following program? $x ="5 Coin" $a=$a+20; Echo $a; Output : 15 Q:-52. How to delete a file from file system using PHP? Unlink() function deletes the given file from file system. Q:-53. What is mean by an associative array in PHP? Associative arrays are also an array with string keys. 12

Q:-54. What is the use of rand() function in PHP? rand () function is basically used to generate random number in PHP. Q:-55. How to find the length of the string in PHP? Strlen() function is used to count the length of the string. Q:-56. Why we use $_REQUEST super global array in PHP? We use $_REQUEST super global array in PHP to collect the data value from $_GET, $_POST and $_COOKIES variable. Q:-57. What is the output of the following program? Echo1<2; Output: 1 Q:-58. What is Apache Configuration file typically called? The name of the Apache Configuration file named is Httpd.conf Q:-59. Give the some example of the super global array in PHP? $_GET, $_POST, $_SESSION, $_COOKIES, $_SERVER, $_REQUEST 13

Q:-60. How would you determine the size of a file in PHP? The filesize() function return a file size in bytes Q:-61. What are the encryption functions in PHP? crypt() function and md5()function. 14