{"id":764,"date":"2017-03-02T14:44:26","date_gmt":"2017-03-02T22:44:26","guid":{"rendered":"http:\/\/www.tech.dimprash.com\/?p=764"},"modified":"2023-02-28T15:45:33","modified_gmt":"2023-02-28T23:45:33","slug":"qualys-phone-interview","status":"publish","type":"post","link":"http:\/\/www.tech.dimprash.com\/?p=764","title":{"rendered":"Qualys Phone Interview"},"content":{"rendered":"<p>1) Difference between interface and abstract class<br \/>\n2) How would you provide security to a web application?<br \/>\n3) Diff between call by value and call by reference<br \/>\n4) Multiple inheritance in PHP<\/p>\n<p>True Multiple inheritance is not possible in PHP. However it can be simulated\u00a0 by a mix of extending a class + &#8220;implementing&#8221; multiple interfaces \/ &#8220;using&#8221; multiple traits.<br \/>\n5) Does PHP pass objects by reference or by value<\/p>\n<pre>Simple answer is by reference. If you pass object to a function and it gets modified inside the function the changed value will be visible outside the function too.\u00a0 However Just remember: pointers to objects, not objects\r\nthemselves, are passed to functions. These pointers are COPIES of the\r\noriginal unless you use \"&amp;\" in your parameter list to actually pass\r\nthe originals. Only when you dig into the internals of an object will\r\nthe originals change. So as such it can also be said that the object pointers are passed by value.\r\n\r\n<strong>Good explanations:<\/strong>\r\nhttps:\/\/www.php.net\/manual\/en\/language.oop5.references.php\r\nhttps:\/\/stackoverflow.com\/questions\/879\/are-php-variables-passed-by-value-or-by-reference<\/pre>\n<p>6) What is ob_start in PHP<br \/>\n7) Which Design Patterns have you worked with?<br \/>\n8) Difference between valid xml and well formed xml<\/p>\n<p>8) Given a string &#8220;This is Bob who has been working since 2002 in this industry. Wow 2002.&#8221;<br \/>\nwrite a program to determine which words in this string are palindromes.<br \/>\nOutput should be<br \/>\n&#8220;Bob&#8221;<br \/>\n&#8220;2002&#8221;<\/p>\n<p>Things to remember while writing the solution:<br \/>\n1) lowercase the string while checking for palindrome<br \/>\n2) Remove fullstops,etc. Account for multiple spaces between words.<br \/>\n3) The string can contain multiple Bob or 2002. So use a hash table to store the palindromes which are found. So that if that word occurs again then you don&#8217;t have to process it again.<\/p>\n<p>9) Given the following schema, write a query which will produce the given output:<\/p>\n<pre>GRADE \r\n  ID   GRADE\r\n   1    A\r\n   2    B\r\n   3    C\r\n\r\nSTUDENT:\r\n  ID   NAME\r\n   1    John \r\n   2    Matt\r\n   3    Allie\r\n\r\nSTUDENT_GRADES: \r\n STUDENT_ID   GRADE_ID \r\n  1              1\r\n  2              2\r\n  3              1\r\n\r\nOUTPUT: \r\n  GRADE   STUDENTS\r\n   A       John, Allie\r\n   B       Matt\r\n   C       NULL\r\n\r\n\r\nSELECT G.GRADE, GROUP_CONCAT(S.NAME)\r\n    FROM grade G \r\n        LEFT JOIN student_grade SG \r\n              ON G.ID = SG.grade_id\r\n        LEFT JOIN student S\r\n              ON S.ID = SG.student_id\r\n        \r\n    GROUP BY G.GRADE\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1) Difference between interface and abstract class 2) How would you provide security to a web application? 3) Diff between call by value and call by reference 4) Multiple inheritance in PHP True Multiple inheritance is not possible in PHP. However it can be simulated\u00a0 by a mix of extending a class + &#8220;implementing&#8221; multiple &hellip; <a href=\"http:\/\/www.tech.dimprash.com\/?p=764\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Qualys Phone Interview<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-764","post","type-post","status-publish","format-standard","hentry","category-interview-questions"],"_links":{"self":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/764","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=764"}],"version-history":[{"count":6,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/764\/revisions"}],"predecessor-version":[{"id":1084,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=\/wp\/v2\/posts\/764\/revisions\/1084"}],"wp:attachment":[{"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=764"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.tech.dimprash.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}