Top 50 PHP Interview Questions and Answers : शीर्ष 50 PHP साक्षात्कार प्रश्न और उत्तर

PHP Interview Questions and Answers

Some PHP interview questions and answers (कुछ PHP साक्षात्कार प्रश्न और उत्तर)-

Question 1. Who is the father of PHP language (PHP भाषा के जनक कौन हैं)?

Answer : Programmer Rasmus Lerdorf (प्रोग्रामर रासमस लेरडॉर्फ) is the father of PHP (general-purpose scripting) language.

Question 2. What is the full form of PHP originally stand for (PHP का पूर्ण रूप मूलतः क्या है)?

Answer : PHP stands for Personal Home Page, but it now stands for Hypertext Preprocessor.
It is general-purpose scripting language (PHP का मतलब पर्सनल होम पेज है, लेकिन अब इसका मतलब हाइपरटेक्स्ट प्रीप्रोसेसर है। यह एक सामान्य प्रयोजन वाली स्क्रिप्टिंग भाषा है).

Question 3. Is PHP a case sensitive language (क्या PHP एक केस सेंसिटिव भाषा है)?

Answer : PHP is Not fully case sensitive language. It is partly a case sensitive language. But variable names are case-sensitive (PHP पूरी तरह से केस सेंसिटिव भाषा नहीं है। यह आंशिक रूप से केस सेंसिटिव भाषा है। लेकिन वेरिएबल नाम केस-सेंसिटिव होते हैं।).

Question 4. What are the most popular frameworks in PHP?

Answer : Some PHP frameworks are given bellow –

  • CakePHP, CodeIgniter (CI), Zend Framework and Symfony.

Question 5. What are most popular Content Management Systems (CMS) in PHP (PHP में सबसे लोकप्रिय सामग्री प्रबंधन प्रणालियाँ (CMS) कौन सी हैं)?

Answer : WordPress(WP), Magneto, Drupal and Joomla (वर्डप्रेस (WP), मैग्नेटो, ड्रुपल और जूमला).

Question 6. What is NULL in PHP (PHP में NULL क्या है)?

Answer : NULL is a particular type of value in PHP. It represents a variable with no value and is usually used to denote the absence of a deal.

Question 7. What is the null function in PHP?

Answer : In PHP, is_null() function checks whether a variable is NULL or not. if the variable is NULL then this function returns true (1) and if the variable is not NULL then it returns nothing/false (PHP में, is_null() फ़ंक्शन यह जाँचता है कि कोई वेरिएबल NULL है या नहीं। यदि वेरिएबल NULL है तो यह फ़ंक्शन true (1) लौटाता है और यदि वेरिएबल NULL नहीं है तो यह nothing/false लौटाता है).

Example –

<?php
$a = 0;
$b = NULL
is_null($a); // it returns nothing/false
is_null($b); // it returns 1
?>

Question 8. What are the differences between PHP variables & constants (PHP चर और अचर के बीच क्या अंतर हैं)?

Answer :

  • PHP constants and variables differences in their scope.
  • PHP constants are global, means they are accessible in whole an application, while variables are only accessible in the area where they were defined (PHP स्थिरांक वैश्विक होते हैं, अर्थात वे सम्पूर्ण अनुप्रयोग में सुलभ होते हैं, जबकि चर केवल उस क्षेत्र में ही सुलभ होते हैं जहां उन्हें परिभाषित किया गया था).
  • PHP constants must be explicitly defined before they can be used, while variables can be used without initializing (PHP स्थिरांकों को उपयोग करने से पहले स्पष्ट रूप से परिभाषित किया जाना चाहिए, जबकि चरों को आरंभीकरण के बिना उपयोग किया जा सकता है).

Question 9. How many types of variables in PHP language (PHP भाषा में कितने प्रकार के variable होते हैं)?

Answer : PHP has three different variable in scopes: local, global & static (
PHP में तीन अलग-अलग चर हैं: स्थानीय, वैश्विक तथा स्थिर).

Question 10. How many Data types in PHP (PHP में कितने डेटा प्रकार हैं)?

Answer : There are 8 data types variables used in PHP –

  • Integers, Doubles (floating-point numbers), Boolean’s, Strings, NULL, Arrays, Objects and Resources (पूर्णांक, डबल्स (फ़्लोटिंग-पॉइंट संख्याएँ), बूलियन, स्ट्रिंग्स, NULL, ऐरे, ऑब्जेक्ट और संसाधन).

Question 11. What is the default time of PHP session (PHP सत्र का डिफ़ॉल्ट समय क्या है)?

Answer : The default session time is until the closing of the browser in PHP.

Question 12. What is the default time limit of PHP script execution?

Answer : The default limit is 30 seconds of PHP script execution.

Question 13. How will you check whether a variable is set in PHP?

Answer: In PHP, the PHP function ISSET checks if a variable is set.

Question 14. What is the main difference between the strstr() and stristr() function in PHP (PHP में strstr() तथा stristr() फ़ंक्शन के बीच मुख्य अंतर क्या है)?

Answer: This main difference between the strstr() and stristr() function is strstr() is not case-sensitive but stristr() is case-sensitive (strstr() और stristr() फ़ंक्शन के बीच यह मुख्य अंतर है कि strstr() केस-सेंसिटिव नहीं है, लेकिन stristr() केस-सेंसिटिव है).

Question 15. What is the name of file of PHP configuration settings (PHP कॉन्फ़िगरेशन सेटिंग्स की फ़ाइल का नाम क्या है)?

Answer: The “php.ini” is the configuration settings file of PHP (“php.ini” PHP की कॉन्फ़िगरेशन सेटिंग्स फ़ाइल है)

Question 16. How do you define a PHP constant?

Answer: A PHP constant is defined given as bellow-

define (“ACONSTANT_NAME”, 400).

Question 17. What is the function used to remove the HTML tags from data (डेटा से HTML टैग हटाने के लिए किस फ़ंक्शन का उपयोग किया जाता है)?

Answer: The strip_tags() function is used to remove HTML tags from data.

Question 18. What is the latest PHP version (नवीनतम PHP संस्करण क्या है)?

Answer: The latest version of PHP is 8.3.

Top 50 PHP Interview Questions and Answers

महत्वपूर्ण दिवस और तिथियां – Important Day and Dates…

Tags: Interview Question Answers of PHP, PHP Interview Questions and Answers, Some PHP interview questions and answers, Top 50 PHP Interview Questions and Answers

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *