interview php questions

Solutions on MaxInterview for interview php questions by the best coders in the world

showing results for - "interview php questions"
Eileen
28 Jul 2016
1# 27 basics questions for php Interview
2
31) What is PHP?
4PHP is a web language based on scripts that allow developers to dynamically create generated web pages.
5
62) What do the initials of PHP stand for?
7PHP means PHP: Hypertext Preprocessor.
8
93) Which programming language does PHP resemble?
10PHP syntax resembles Perl and C
11
124) What does PEAR stand for?
13PEAR means PHP Extension and Application Repository. It extends PHP and provides a higher level of programming for web developers.
14
155) What is the actually used PHP version?
16Version 7.1 or 7.2 is the recommended version of PHP.
17
186) How do you execute a PHP script from the command line?
19Just use the PHP command line interface (CLI) and specify the file name of the script to be executed as follows:
20php script.php
21
227) How to run the interactive PHP shell from the command line interface?
23Just use the PHP CLI program with the option -a as follows:
24php -a
25
268) What is the correct and the most two common way to start and finish a PHP block of code?
27The two most common ways to start and finish a PHP script are:
28 <?php [   ---  PHP code---- ] ?> and <? [---  PHP code  ---] ?>
29
309) How can we display the output directly to the browser?
31To be able to display the output directly to the browser, we have to use the special tags <?= and ?>.
32
3310) What is the main difference between PHP 4 and PHP 5?
34PHP 5 presents many additional OOP (Object Oriented Programming) features.
35
3611) Is multiple inheritance supported in PHP?
37PHP supports only single inheritance; it means that a class can be extended from only one single class using the keyword extended.
38
3912) What is the meaning of a final class and a final method?
40final is introduced in PHP5. Final class means that this class cannot be extended and a final method cannot be overridden.
41
4213) How is the comparison of objects done in PHP?
43We use the operator == to test is two objects are instanced from the same class and have same attributes and equal values. We can test if two objects are referring to the same instance of the same class by the use of the identity operator ===.
44
4514) How can PHP and HTML interact?
46It is possible to generate HTML through PHP scripts, and it is possible to pass pieces of information from HTML to PHP.
47
4815) What type of operation is needed when passing values through a form or an URL?
49If we would like to pass values through a form or an URL, then we need to encode and to decode them using htmlspecialchars() and urlencode().
50
5116) How can PHP and Javascript interact?
52PHP and Javascript cannot directly interact since PHP is a server side language and Javascript is a client-side language. However, we can exchange variables since PHP can generate Javascript code to be executed by the browser and it is possible to pass specific variables back to PHP via the URL.
53
5417) What is needed to be able to use image function?
55GD library is needed to execute image functions.
56
5718) What is the use of the function imagetypes()?
58imagetypes() gives the image format and types supported by the current version of GD-PHP.
59
6019) What are the functions to be used to get the imags properties (size, width, and height)?
61The functions are getimagesize() for size, imagesx() for width and imagesy() for height.
62
6320) How failures in execution are handled with include() and require() functions?
64If the function require() cannot access the file then it ends with a fatal error. However, the include() function gives a warning, and the PHP script continues to execute.
65
6621) What is the main difference between require() and require_once()?
67require(), and require_once() perform the same task except that the second function checks if the PHP script is already included or not before executing it.
68(same for include_once() and include())
69
7022) How can I display text with a PHP script?
71Two methods are possible:
72<!--?php echo Method 1; print Method 2; ?-->
73
7423) How can we display information of a variable and readable by a human with PHP?
75To be able to display a human-readable result we use print_r().
76
7724) How is it possible to set an infinite execution time for PHP script?
78The set_time_limit(0) added at the beginning of a script sets to infinite the time of execution to not have the PHP error maximum execution time exceeded. It is also possible to specify this in the php.ini file.
79
8025) What does the PHP error Parse error in PHP - unexpected T_variable at line x means?
81This is a PHP syntax error expressing that a mistake at the line x stops parsing and executing the program.
82
8326) What should we do to be able to export data into an Excel file?
84The most common and used way is to get data into a format supported by Excel. For example, it is possible to write a .csv file, to choose for example comma as a separator between fields and then to open the file with Excel.
85
8627) What is the function file_get_contents() useful for?
87file_get_contents() lets reading a file and storing it in a string variable.
Charissa
23 Aug 2019
1echo "click on the link given below in source";
queries leading to this page
php basics for interviewinterview questions for phpphp technical program questionsphp interview interviewbitphp interview programsadvanced php interview questionphp html interview questions and answersphp interview questions operatorswhat are the questions asked in php interviewphp interview questions answersphp core interview questions 2b2yearsphp experienced interview questionsphp core interview questionsphp interview questions and answers for 4 year experiencequestion language phpphp developer interview questionsphp mysql interview questionsphp practical questionslogical interview questions and answers phpinterview questions for php developerphp coding questionshp php interview questionsphp intreview questionbasics of php for interviewfor loop interview questions php8 2b php interview questionsgeneral how to questions in phpphp developer job interview questionsphp interview tests for interviewersdatabase questions in phpwhat to learn for php interviews questions and answersphp interview questions for experienced professionalsphp code interview preparecore php interview questions and answersphp questions during interviewsphp interview questions 5 functionsphp interview questions and answers for fresherswhat is php interview questionsphp questions in interviewcoding interview questions with solutions in phpphp interview questions and answers pdfphp basic interview queastionphp 26 mysql interview questionsbasic php interview questionmy sql and php interview questionsphp fresher questionphp interview qusetionsjunior php interview questionsphp 7 interview questionsphp web architecture interview questionsinterview questions about phptechnical interview questions for phpphp question with answerphp interview questions codinginterview questions of phplogical programming interview questions in phpphp interview questions and answers seniorphp interview testsphp interview questionphp array interview questionsphp interview experince questionsphp coding questions setcore php interview questions for 3 year experiencephp interview questions experiencedquestions to ask php developer interviewquestions related to php coding standardsphp interview programs on functionphp interview questionsinterview questions phpphp data structure interview questionsphp output based interview questionsphp interview questions and answers for experienced candidatescommon php questionscore php basic interview practical questionsphp developers interview questionphp beginners level interview questions and answerinterview question phpcore php interview questionsprogramming questions on phpphp practical questions and answersinterview in phpphp interview q 26 aphp senior interview questionsphp freshers interview questionphp interview questions for php freshersbasic phps interview questionsviva questions for phpphp interview questions advancephp interview questionphp interview tasksphp question asked in interview timephp interview practice questionsphp questions 26 answersmost important php interview questions and answersphp question answerphp based interview questionslogical interview questions in phpphp interview programs for freshersphp backend interview questionsharp php questionsinterview questions asked for php developerphp all questions and answersphp experienced interview questions and answers 2021php interview questions and answers php interview questions and answers for fresher basic php programs php programming 2f logical interview questions and answerstechnical interview phpinterview questions in phpbasic questions of phpcommon php interview questionsphp interview questions in pdfinterview questions of php developerphp basic questions and answers for interviewphp interview technical questionsphp basic interview questions for freshersphp interview qustion and answerphp common interview questions quoraphp advanced interview questionsphp interview questions for 4 year experiencesenior php questionsbasic php interview questionsphp and interview questionsphp inteview questionsquestion phpphp basic interview questions and answersinterview question for php experiencephp interview questions and answers interviewbittop php questions interviewcode samples for php interviewphp coding interview questions and answers for experiencedcore php interview taskprogramming interview questions and answers phpcommon questions job interview phphtml 26 css 26 php interview questionphp interview questions juniorphp viva questionsphp basic questionbasic php questions and answersphp interviewphp questionphp questions for interviewbasic coding questions on mysql phpphp interview logical interview questins for experiencedimportant php interview questionscore php code interview questions and answersphp interview questions with answersoop interview questions phpbasic php coding questions4 options and answers based interview questions for php experiencedphp programming interview questionsphp interview questions top 50 questions for php developerstricky interview questions about phpphp important questions for interviewcommone php questions interviewtnq php interview questionsinterview easy questions in phpphp interview questions for freshersample php write questionsphp interview questions and answers for experiencedtop 100 php interview questionsphp question and answersphp interview querytionsphp interview qiestionsadvanced php interview questionsphp exam interview questionsphp interview quesstionbasic php interview programming questionsphp interview question inriawhere i can ask questions about phpinterview question i phpphp function interviewphp fresher interview questionsphp basic interview questions for experiencedphp interview questions pdfquestions asked in interview for php developerinterview questions on phpphp framework interview questions and answersmost common php lavra interview questionsphp technical interview questions and answersbasic php questions vivaphp job interview questionsphp expert interview questionsphp interview codingphp interviewinriathe question of php when interview 3fadvanced php interview questions and answersinterview questions php experiencedphp interview quesionask questions in phptop 10 php interview questions and answersphp interview questions topinteview questions on phpphp interview q 26apreparing for php interviewcoding interview questions phpphp basic questionsphp query interview questions and answers for experiencedphp interview questonsmost asked php interview questionstechnical interview questions phpquestions and answers about phpinterview questions and answers for freshers in phpphp interview quetionsphp project manger interview questionsphp coding questions and answersphp interiew questionscommon php interviewphp intervew questionsphp invterview questionsinterview quiesions phpprogramming questions phpphp developer interview questions and answers for experiencedphp programs for interviewphp intervieew questionsinterview question and answer for phpfunctions in php interview questionsphp important question in interviewphp top 10 interview questionsphp questions for experiencedquestions about phpinterview question php technicalcore php interview task practicalexample question in phplogical questions for php developertechnical questions on phpphp developer interview questions for freshersphp basic interview questionsphp core interview notesphp programming interview questions for experiencedphp interview for fresherinterview questions for freshers phpinterview php questions and answers for freshers in itphp interview projectphp most popular interview quesitonphp intervie questionphp functions interview questionswhich topics of php for interviewonline quiz using php project interviwe questionphp most asked questionsbasic php programming questionsphp technical interview questions for experiencedphp code questions and answersphp client interview questionsphp interview tastsphp company interviewprogram for technical interview in phpphp intermediate interview questionsmost commom question in php interviewphp interview questions for 1 year experiencetop php interview questions and answers for experiencedphp practical interview questionsphp technical questionsphp interview quessionphp linked questionphp fundamentals interview questionsguru php questionsphp logical interview qusetions5 questions phpchoice based php interview questions and answersphp interview questions umniahphp basic questions and answersphp questions and answers pdfphp coding interview questionphp form interview questionscore php basic interview questionssimple php questionsphp mysql interview questionphp inerview questionmost frequently asked php interview questionsphp interview practicephp mysql interview questions and answers for experiencedquestion answers in php usingphp server side interview questions and answersphp basic viva questionsphp interview questions and answers 2021php technical interview questions for freshersphp developer questions for interviewinterview questions and answers for php web developerphp interview code questionsphp questions to ask in an interviewphp latest interview questionsinterviewbit phpadvanced interview questions in phpfrequently asked php interview questionsphp lead interview questionsphp developer interview questio nsphp questions asked in interviewphp interview questions ansphp developer interview questions for experiencedphp questionsinterview questions and answers of phpphp questions examplesmysql interview questions for experienced php developerstoptal interview questions phpphp interview questions for freshserphp interview vragenphp frequently asked questionsphp question for interviewphp intervie questionsphp development for beginners interview questionsphp interview code examplesphp tutorial point interview questionsphp interview quesionsphp code questionsphp logical interview question programming interview questions phpphp questions and answersphp top 50php technical interview questionsphp simple interview questionsphp development interview questionsphp telephonic interview questions and answersphp techniqcal interview questionsphp problems questions and answersphp interview programming questions for experiencedcode interview questions phpphp programming questions for interviewphp interview looping questions for freshersinterview questions for freshers in phpphp interview questions for freshers 2020senior php interview questionsphp related questionsphp interview questions ans answersbasic php questionsphp basic questions for interview for 3 experienced 24ask in phpphp basic questions for interviewmost common interview question phpphp interview advanced questions and answersphp sample project for interviewphp sql questionsphp interview questions and answers for experienced web developerphp interview questions seniorphp interview questions for beginnerinterview question on core phpquestion ask for phpphp backend interview questionsphp tutorial interview questionstop php interview questionsphp sql interview questionsphp files interview questionsphp oop interview questionscoding interview questions php mysqlinterview questions for a php developerphp onterview questionpractice interview questions phpphp common interview questionsphp program for interviewphp question and answercore php interview questionsphp interview question and answerphp logical interview questions and answersbasic interview questions for phpviva questions on phplogical questions for php interviewquestions techniques phpinterview php programming questionsphp interview question sinterview php questions easylatest php interview questions for experiencedinterview questions and answers for experience in phpphp interview questions tutorialspointall php interview questionsphp interview questions backendphp questions and answers systemphp interview programs for experiencedphp interview questions and answers for 10 year experiencephp interview coding questionsphp interview question and answer for fresheradvanced php interview questions and answers for experiencedinterview question of phptop php interview questions and answers for fresherstechnical interview questions of phpphp interview questions for freshersfreshers php interview questionsguru php interview questionsinterview question on phpinterview questions php developerphp questions interviewphp freshers interview questionsphp coding interview questionsacing a php interviewprogramming questions on phpinterview questions and answers phpinterveiw questions for phpphp logical interview questionsinterview php questionsphp and mysql interview questionslogical interview question answer phpphp to make questionsphp anf framework interview questionphp interview questions advancedtop viva questions for phpphp basic interview questions and answers for logical programming php functions list for interview questions and answerslogical program interview questions answers in phpphp exerienced interview questionsphp engineer interview questionsquestion answer phpcommonly asked questions for phptop questions in phpcoding questions phptechnical php interview questionstoptal php interview questionstop interview questions in phpphp concepts for interviewinterview questions and answers php developerphp interview questions for experiencedphp interivew questionslatest php interview questionsphp interview questions and answerscore php programming interview questions and answersphp fresher interview questions practicalphp experience interview questions and answerscore php interview quentioninterview questions related phpbasic questions for php interviewmysql php interview questionsphp question ask in interview timephp interview programming questionsadvanced php interview questions for experiencedphp interview questions for experiencephp related questions for interviewphp interview questions for 5 yearsphp interview practical questionsquestions for php interviewtop questions about phpmysql interview questions in phpproblem solving interview questions phpphp mysql technical interview questions answersphp logical question for interviewcontact php interview questionsphp coding questionsphp and mysql interview questions and answersphp problem solving interview questionsphp programming questionsbasic php interview questions for freshersphp logic interview questionshow to take php interview php interview mcqsphp questions asked in interview timephp questions asked in interview for experienced candidatesfew php interview questionsphp interview questionscore php practical interview questions and answersphp logical programming interview questions and answers for experiencedwhy you choose php interview questionsphp interview questions and answers for experienced tutorialspointhow to prepare for php developer interviewask questions in php ctlphp interview questions toptalphp fundamentals for interviewsome php interview questionsphp framework interview questionsphp function questions answephp interview questions for 4 years experiencelogical interview questions for phpmysql database php interview questionsphp database interview questionscore php code interview questionsphp starts questionsprogramming problems interview phpinterview question in phpsome basic interview questions phpgood questions for interview phpphp code interview questionsinterview php questions