{"id":48129,"date":"2018-01-29T05:49:11","date_gmt":"2018-01-29T00:19:11","guid":{"rendered":"http:\/\/blog.odango.com\/?p=48129"},"modified":"2023-02-04T09:30:46","modified_gmt":"2023-02-04T04:00:46","slug":"php-interview-questions-and-answers","status":"publish","type":"post","link":"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/","title":{"rendered":"PHP Interview Questions And Answers"},"content":{"rendered":"\n[et_pb_section bb_built=&#8221;1&#8243; next_background_color=&#8221;#000000&#8243;][et_pb_row][et_pb_column type=&#8221;4_4&#8243;][et_pb_post_title _builder_version=&#8221;3.0.106&#8243; title=&#8221;on&#8221; meta=&#8221;off&#8221; author=&#8221;on&#8221; date=&#8221;on&#8221; categories=&#8221;on&#8221; comments=&#8221;on&#8221; featured_image=&#8221;off&#8221; featured_placement=&#8221;below&#8221; text_color=&#8221;dark&#8221; text_background=&#8221;off&#8221; title_font=&#8221;Titillium Web||||||||&#8221; title_font_size=&#8221;47&#8243; title_font_size_tablet=&#8221;40&#8243; title_font_size_phone=&#8221;35&#8243; title_font_size_last_edited=&#8221;on|desktop&#8221; title_text_color=&#8221;rgba(0,0,0,0.8)&#8221; title_text_align=&#8221;left&#8221; text_shadow_horizontal_length=&#8221;0.08em&#8221; text_shadow_vertical_length=&#8221;0.08em&#8221; text_shadow_blur_strength=&#8221;0.08em&#8221; title_text_shadow_horizontal_length=&#8221;0.08em&#8221; title_text_shadow_vertical_length=&#8221;0.08em&#8221; custom_margin=&#8221;|||10%&#8221; \/][\/et_pb_column][\/et_pb_row][et_pb_row][et_pb_column type=&#8221;4_4&#8243;][et_pb_text _builder_version=&#8221;3.0.106&#8243; background_layout=&#8221;light&#8221; text_font=&#8221;Titillium Web|300|||||||&#8221; text_font_size=&#8221;20&#8243; text_font_size_last_edited=&#8221;on|desktop&#8221; text_text_color=&#8221;rgba(0,0,0,0.8)&#8221; text_line_height=&#8221;1.6em&#8221; max_width=&#8221;800px&#8221; custom_margin=&#8221;|||10%&#8221; text_line_height_last_edited=&#8221;off|phone&#8221; max_width_last_edited=&#8221;off|phone&#8221; custom_margin_last_edited=&#8221;off|desktop&#8221;]\r\n<div class=\"article__body\">\r\n\r\n<strong>1) What is the difference between PHP running under the Apache module and running under CGI program?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>When PHP is running under the apache module the php.ini settings will be loaded into memory when we start the Apache web server. Whereas when running under CGI mode for each and every request the settings will be loaded into memory. If you made any change in php.ini and if you are running under Apache, you must restart it.\r\n\r\n<hr \/>\r\n\r\n<strong>2) What are the types of XML parsers available in PHP?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>There are two types of XML parsers available which is \u201cTree\u201d based parser and \u201cEvent\u201d based parser. \u201cTree\u201d based parsers are very useful when we parse a small XML files or strings, an ideal example would be a SimpleXML library in PHP. \u201cEvent\u201d based parsers are very useful to parse large XML files, the example would be SAX parser in PHP.\r\n\r\n<hr \/>\r\n\r\n<strong>3) How do you achieve polymorphism in PHP?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Using the magic methods: set(), get(), isset()\r\n\r\n<hr \/>\r\n\r\n<strong>4) How do you achieve multiple inheritances in PHP?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Using Interface\r\n\r\n<hr \/>\r\n\r\n<strong>5) What are the characters will be automatically escaped when you enable \u201cmagic_quotes_gpc\u201d in your php.ini file?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Single quote (\u2018), Double quote (\u201c) and null (NULL)\r\n\r\n<hr \/>\r\n\r\n<strong>6) Name few functions in PHP to execute OS commands?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>system, exec, passthrough etc.\r\n\r\n<hr \/>\r\n\r\n<strong>7) How do you achieve Multi-Threading in PHP?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Using pcntl forking, which will be used in UNIX like OS in CLI mode.\r\n\r\n<hr \/>\r\n\r\n<strong>8) What&#8217;s PHP ?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0The 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.\r\n\r\n<hr \/>\r\n\r\n<strong>9) What Is a Session?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0A session is a logical object created by the PHP engine to allow you to preserve data across subsequent HTTP requests.\r\nThere is only one session object available to your PHP scripts at any time. Data saved to the session by a script can be retrieved by the same script or another script when requested from the same visitor.\r\nSessions are commonly used to store temporary data to allow multiple PHP pages to offer a complete functional transaction for the same visitor.\r\n\r\n<hr \/>\r\n\r\n<strong>10) What is meant by PEAR in php?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0PEAR is short for &#8220;PHP Extension and Application Repository&#8221; and is pronounced just like the fruit. The purpose of PEAR is to provide:\r\nA structured library of open-sourced code for PHP users\r\nA system for code distribution and package maintenance\r\nA standard style for code written in PHP\r\nThe PHP Foundation Classes (PFC),\r\nThe PHP Extension Community Library (PECL),\r\nA web site, mailing lists and download mirrors to support the PHP\/PEAR community\r\nPEAR is a community-driven project with the PEAR Group as the governing body. The project has been founded by Stig S. Bakken in 1999 and quite a lot of people have joined the project since then.\r\n\r\n<hr \/>\r\n\r\n<strong>11) How can we know the number of days between two given dates using PHP?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Simple arithmetic:\r\n$date1 = date(&#8216;Y-m-d&#8217;);\r\n$date2 = &#8216;2006-07-01&#8217;;\r\n$days = (strtotime() &#8211; strtotime()) \/ (60 * 60 * 24);\r\necho &#8220;Number of days since &#8216;2006-07-01&#8217;: $days&#8221;;\r\n\r\n<hr \/>\r\n\r\n<strong>12) How can we repair a MySQL table?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0The syntex for repairing a mysql table is:\r\nREPAIR TABLE tablename\r\nREPAIR TABLE tablename QUICK\r\nREPAIR TABLE tablename EXTENDED\r\n\r\nThis command will repair the table specified.\r\nIf QUICK is given, MySQL will do a repair of only the index tree.\r\nIf EXTENDED is given, it will create index row by row.\r\n\r\n<hr \/>\r\n\r\n<strong>13) What is the difference between $message and $$message?\r\nAns:\u00a0<\/strong>\r\n$message is a simple variable whereas $$message is a reference variable.\r\n\r\nExample:\r\n$user = &#8216;bob&#8217; is equivalent to\r\n\r\n$holder = &#8216;user&#8217;;\r\n$$holder = &#8216;bob&#8217;;\r\n\r\n<hr \/>\r\n\r\n<strong>14) What Is a Persistent Cookie?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0 A persistent cookie is a cookie which is stored in a cookie file permanently on the browser&#8217;s computer. By default, cookies are created as temporary cookies which stored only in the browser&#8217;s memory. When the browser is closed, temporary cookies will be erased. You should decide when to use temporary cookies and when to use persistent cookies based on their differences:\r\n*Temporary cookies can not be used for tracking long-term information.\r\n*Persistent cookies can be used for tracking long-term information.\r\n*Temporary cookies are safer because no programs other than the browser can access them.\r\n*Persistent cookies are less secure because users can open cookie files see the cookie values.\r\n\r\n<hr \/>\r\n\r\n<strong>15) What does a special set of tags do in PHP?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>The output is displayed directly to the browser.\r\n\r\n<hr \/>\r\n\r\n<strong>16) What are the differences between DROP a table and TRUNCATE a table?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0DROP TABLE table_name &#8211; This will delete the table and its data.\r\n\r\nTRUNCATE TABLE table_name &#8211; This will delete the data of the table, but not the table definition.\r\n\r\n<hr \/>\r\n\r\n<strong>17) How do you call a constructor for a parent class?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0parent::constructor($value)\r\n\r\n<hr \/>\r\n\r\n<strong>18) What are the different types of errors in php?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Here are three basic types of runtime errors in PHP:\r\n\r\n1. Notices: These are trivial, non-critical errors that PHP encounters while executing a script &#8211; for example, accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all &#8211; although you can change this default behavior.\r\n\r\n2. Warnings: These are more serious errors &#8211; for example, attempting to include() a file which does not exist. By default, these errors are displayed to the user, but they do not result in script termination.\r\n\r\n3. Fatal errors: These are critical errors &#8211; for example, instantiating an object of a non-existent class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHP&#8217;s default behavior is to display them to the user when they take place.\r\n\r\nInternally, these variations are represented by twelve different error types\r\n\r\n<hr \/>\r\n\r\n<strong>19) What\u2019s the special meaning of _sleep and _wakeup?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0_sleep returns the array of all the variables than need to be saved, while _wakeup retrieves them.\r\n\r\n<hr \/>\r\n\r\n<strong>20) What are the MySQL database files stored in system ?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Data is stored in name.myd\r\nTable structure is stored in name.frm\r\nIndex is stored in name.myi\r\n\r\n<hr \/>\r\n\r\n<strong>21) How can we register the variables into a session?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>session_register($session_var);\r\n\r\n$_SESSION[&#8216;var&#8217;] = &#8216;value&#8217;;\r\n\r\n<hr \/>\r\n\r\n<strong>22) What is the difference between characters \\023 and \\x23?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>The first one is octal 23, the second is hex 23.\r\n\r\n<hr \/>\r\n\r\n<strong>23) With a heredoc syntax, do I get variable substitution inside the heredoc contents?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Yes.\r\n\r\n<hr \/>\r\n\r\n<strong>24) :What is meant by MIME?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0 MIME is Multipurpose Internet Mail Extensions is an Internet standard for the format of e-mail. However browsers also uses MIME standard to transmit files. MIME has a header which is added to a beginning of the data. When browser sees such header it shows the data as it would be a file (for example image)\r\nSome examples of MIME types:\r\naudio\/x-ms-wmp\r\nimage\/png\r\napplication\/x-shockwave-flash\r\n\r\n<hr \/>\r\n\r\n<strong>25) How can we create a database using PHP and mysql?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0We can create MySQL database with the use of mysql_create_db($databaseName) to create a database.\r\n\r\n<hr \/>\r\n\r\n<strong>26) How many ways we can retrieve the date in result set of mysql using php?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>As individual objects so single record or as a set or arrays.\r\n\r\n<hr \/>\r\n\r\n<strong>27)\u00a0<\/strong><strong>What is the difference between PHP4 and PHP5?<\/strong>\r\n\r\n<strong>Ans:<\/strong><strong>\u00a0<\/strong>PHP4 cannot support oops concepts and Zend engine 1 is used.\r\nPHP5 supports oops concepts and Zend engine 2 is used.\r\nError supporting is increased in PHP5.\r\nXML and SQLLite will is increased in PHP5.\r\n\r\n<hr \/>\r\n\r\n<strong>28) How do I accomplish that with PHP?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>On large strings that need to be formatted according to some length specifications, use wordwrap() or chunk_split().\r\n\r\n<hr \/>\r\n\r\n<strong>29) What\u2019s the difference between htmlentities() and htmlspecialchars()?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0htmlspecialchars only takes care of\u00a0&lt;, &gt;,\u00a0single quote \u2018, double quote &#8221; and ampersand. htmlentities translates all occurrences of character sequences that have different meaning in HTML.\r\n\r\n<hr \/>\r\n\r\n<strong>30) How can we extract string &#8220;abc.com&#8221; from a string &#8220;mailto:info@abc.com?subject=Feedback&#8221; using regular expression of PHP?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\r\n\r\n$text = &#8220;mailto:info@abc.com?subject=Feedback&#8221;;\r\npreg_match(&#8216;|.*@([^?]*)|&#8217;, $text, $output);\r\necho $output[1];\r\n\r\nNote that the second index of $output, $output[1], gives the match, not the first one, $output[0].\r\n\r\nSo if md5() generates the most secure hash, why would you ever use the less secure\r\n\r\n<hr \/>\r\n\r\n<strong>31) crc32() and sha1()?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Crypto usage in PHP is simple, but that doesn\u2019t mean it\u2019s free. First off, depending on the data that you\u2019re encrypting, you might have reasons to store a 32-bit value in the database instead of the 160-bit value to save on space. Second, the more secure the crypto is, the longer is the computation time to deliver the hash value. A high volume site might be significantly slowed down, if frequent md5() generation is required.\r\n\r\n<hr \/>\r\n\r\n<strong>32) How can we destroy the session, how can we unset the variable of a session?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0session_unregister() &#8211; Unregister a global variable from the current session\r\nsession_unset() &#8211; Free all session variables\r\n\r\n<hr \/>\r\n\r\n<strong>33) What are the different functions in sorting an array?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Sorting functions in PHP:\r\nasort()\r\narsort()\r\nksort()\r\nkrsort()\r\nuksort()\r\nsort()\r\nnatsort()\r\nrsort()\r\n\r\n<hr \/>\r\n\r\n<strong>34) How can we know the count\/number of elements of an array?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a02 ways:\r\na) sizeof($array) &#8211; This function is an alias of count()\r\nb) count($urarray) &#8211; This function returns the number of elements in an array.\r\nInterestingly if you just pass a simple var instead of an array, count() will return 1.\r\n\r\n<hr \/>\r\n\r\n<strong>35) How many ways we can pass the variable through the navigation between the pages?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0At least 3 ways:\r\n\r\n1. Put the variable into session in the first page, and get it back from session in the next page.\r\n2. Put the variable into cookie in the first page, and get it back from the cookie in the next page.\r\n3. Put the variable into a hidden form field, and get it back from the form in the next page.\r\n\r\n<hr \/>\r\n\r\n<strong>36) What is the maximum length of a table name, a database name, or a field name in MySQL?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Database name: 64 characters\r\nTable name: 64 characters\r\nColumn name: 64 characters\r\n\r\n<hr \/>\r\n\r\n<strong>37) How many values can the SET function of MySQL take?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>\u00a0MySQL SET function can take zero or more values, but at the maximum it can take 64 values.\r\n\r\n<hr \/>\r\n\r\n<strong>38) What are the other commands to know the structure of a table using MySQL commands except EXPLAIN command?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0DESCRIBE table_name;\r\n\r\n<hr \/>\r\n\r\n<strong>39) How can we find the number of rows in a table using MySQL?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>Use this for MySQL\r\nSELECT COUNT(*) FROM table_name;\r\n\r\n<hr \/>\r\n\r\n<strong>40) What\u2019s the difference between md5(), crc32() and sha1() crypto on PHP?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0The major difference is the length of the hash generated. CRC32 is, evidently, 32 bits, while sha1() returns a 128 bit value, and md5() returns a 160 bit value. This is important when avoiding collisions.\r\n\r\n<hr \/>\r\n\r\n<strong>41) How can we find the number of rows in a result set using PHP?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0Here is how can you find the number of rows in a result set in PHP:\r\n$result = mysql_query($any_valid_sql, $database_link);\r\n$num_rows = mysql_num_rows($result);\r\necho &#8220;$num_rows rows found&#8221;;\r\n\r\n<hr \/>\r\n\r\n<strong>42) How many ways we can we find the current date using MySQL?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\r\n\r\nSELECT CURDATE();\r\nSELECT CURRENT_DATE();\r\nSELECT CURTIME();\r\nSELECT CURRENT_TIME();\r\n\r\n<hr \/>\r\n\r\n<strong>42) Give the syntax of GRANT commands?<\/strong>\r\n\r\n<strong>Ans:<\/strong>\u00a0The generic syntax for GRANT is as following\r\n\r\nGRANT [rights] on [database] TO [username@hostname] IDENTIFIED BY [password]\r\n\r\nNow rights can be:\r\na) ALL privileges\r\nb) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc.\r\n\r\nWe can grant rights on all database by using h *.* or some specific database by database.* or a specific table by database.table_name.\r\n\r\n<hr \/>\r\n\r\n<strong>43) Give the syntax of REVOKE commands?<\/strong>\r\n\r\n<strong>Ans:\u00a0<\/strong>The generic syntax for revoke is as following\r\n\r\nREVOKE [rights] on [database] FROM [username@hostname]\r\n\r\nNow rights can be:\r\na) ALL privileges\r\nb) Combination of CREATE, DROP, SELECT, INSERT, UPDATE and DELETE etc.\r\n\r\nWe can grant rights on all database by using *.* or some specific database by database.* or a specific table by database.table_name.\r\n\r\n<code><\/code>\r\n\r\n<\/div>\r\n[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section][et_pb_section bb_built=&#8221;1&#8243; prev_background_color=&#8221;#000000&#8243;][et_pb_row][et_pb_column type=&#8221;4_4&#8243;][et_pb_team_member _builder_version=&#8221;3.0.106&#8243; name=&#8221;Chandanakatta&#8221; position=&#8221;Author&#8221; facebook_url=&#8221;&#8221; twitter_url=&#8221;&#8221; google_url=&#8221;&#8221; linkedin_url=&#8221;&#8221; background_layout=&#8221;light&#8221; image_url=&#8221;https:\/\/asha24.net\/blog\/\/wp-content\/uploads\/2018\/03\/portraits-circle-small_1.png&#8221; header_font=&#8221;Titillium Web|700|||||||&#8221; body_font=&#8221;Titillium Web||||||||&#8221; body_font_size=&#8221;16&#8243; body_font_size_last_edited=&#8221;on|desktop&#8221; disabled=&#8221;off&#8221; disabled_on=&#8221;off|off|&#8221;]\r\n\r\nHey there! I shoot some hoops when I\u2019m not drowned in the books, sitting by the side of brooks.\r\n\r\n[\/et_pb_team_member][\/et_pb_column][\/et_pb_row][\/et_pb_section]\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":4,"featured_media":48131,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[57],"tags":[58],"class_list":["post-48129","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interview-questions","tag-interview-questions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP Interview Questions And Answers - Asha24 Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP Interview Questions And Answers - Asha24 Blog\" \/>\n<meta property=\"og:url\" content=\"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/\" \/>\n<meta property=\"og:site_name\" content=\"Asha24 Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-01-29T00:19:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-04T04:00:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/php-interview-questions-and-answers-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"459\" \/>\n\t<meta property=\"og:image:height\" content=\"287\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mahesh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/asha24.net\/blog\/#website\",\"url\":\"https:\/\/asha24.net\/blog\/\",\"name\":\"Asha24 Blog\",\"description\":\"Dedication Towards Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/asha24.net\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/php-interview-questions-and-answers-1.jpg\",\"contentUrl\":\"https:\/\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/php-interview-questions-and-answers-1.jpg\",\"width\":459,\"height\":287},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/#webpage\",\"url\":\"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/\",\"name\":\"PHP Interview Questions And Answers - Asha24 Blog\",\"isPartOf\":{\"@id\":\"https:\/\/asha24.net\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/#primaryimage\"},\"datePublished\":\"2018-01-29T00:19:11+00:00\",\"dateModified\":\"2023-02-04T04:00:46+00:00\",\"author\":{\"@id\":\"https:\/\/asha24.net\/blog\/#\/schema\/person\/f6167b78bbaddfc399ae1154cd5b6759\"},\"breadcrumb\":{\"@id\":\"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/asha24.net\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP Interview Questions And Answers\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/asha24.net\/blog\/#\/schema\/person\/f6167b78bbaddfc399ae1154cd5b6759\",\"name\":\"Mahesh\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/asha24.net\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/085c03e75ffb51af2509c1cfad9c7d78b30236d43a008db2e46f96e2f40c67fc?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/085c03e75ffb51af2509c1cfad9c7d78b30236d43a008db2e46f96e2f40c67fc?s=96&d=wavatar&r=g\",\"caption\":\"Mahesh\"},\"url\":\"https:\/\/asha24.net\/blog\/author\/mahesh\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP Interview Questions And Answers - Asha24 Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/","og_locale":"en_US","og_type":"article","og_title":"PHP Interview Questions And Answers - Asha24 Blog","og_url":"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/","og_site_name":"Asha24 Blog","article_published_time":"2018-01-29T00:19:11+00:00","article_modified_time":"2023-02-04T04:00:46+00:00","og_image":[{"width":459,"height":287,"url":"https:\/\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/php-interview-questions-and-answers-1.jpg","path":"\/home\/reviews981\/public_html\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/php-interview-questions-and-answers-1.jpg","size":"full","id":48131,"alt":"","pixels":131733,"type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mahesh","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/asha24.net\/blog\/#website","url":"https:\/\/asha24.net\/blog\/","name":"Asha24 Blog","description":"Dedication Towards Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/asha24.net\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/#primaryimage","inLanguage":"en-US","url":"https:\/\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/php-interview-questions-and-answers-1.jpg","contentUrl":"https:\/\/asha24.net\/blog\/wp-content\/uploads\/2018\/03\/php-interview-questions-and-answers-1.jpg","width":459,"height":287},{"@type":"WebPage","@id":"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/#webpage","url":"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/","name":"PHP Interview Questions And Answers - Asha24 Blog","isPartOf":{"@id":"https:\/\/asha24.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/#primaryimage"},"datePublished":"2018-01-29T00:19:11+00:00","dateModified":"2023-02-04T04:00:46+00:00","author":{"@id":"https:\/\/asha24.net\/blog\/#\/schema\/person\/f6167b78bbaddfc399ae1154cd5b6759"},"breadcrumb":{"@id":"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/asha24.net\/blog\/php-interview-questions-and-answers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/asha24.net\/blog\/"},{"@type":"ListItem","position":2,"name":"PHP Interview Questions And Answers"}]},{"@type":"Person","@id":"https:\/\/asha24.net\/blog\/#\/schema\/person\/f6167b78bbaddfc399ae1154cd5b6759","name":"Mahesh","image":{"@type":"ImageObject","@id":"https:\/\/asha24.net\/blog\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/085c03e75ffb51af2509c1cfad9c7d78b30236d43a008db2e46f96e2f40c67fc?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/085c03e75ffb51af2509c1cfad9c7d78b30236d43a008db2e46f96e2f40c67fc?s=96&d=wavatar&r=g","caption":"Mahesh"},"url":"https:\/\/asha24.net\/blog\/author\/mahesh\/"}]}},"_links":{"self":[{"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/posts\/48129","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/comments?post=48129"}],"version-history":[{"count":5,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/posts\/48129\/revisions"}],"predecessor-version":[{"id":52185,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/posts\/48129\/revisions\/52185"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/media\/48131"}],"wp:attachment":[{"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/media?parent=48129"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/categories?post=48129"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/asha24.net\/blog\/wp-json\/wp\/v2\/tags?post=48129"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}