๐น PHP Interview Questions (Beginner Level) – Short Answers What is PHP? → PHP is a server-side scripting language used to create dynamic websites. When and why is it used? → Used for web development to handle forms, sessions, databases, and more. What are the main features of PHP? → Open-source, server-side, platform-independent, supports databases. Difference between echo and print ? → echo is faster and can print multiple values; print returns 1 (used in expressions). How do you declare variables in PHP? → With $ symbol. Example: $name = "John"; What are data types in PHP? → String, Integer, Float, Boolean, Array, Object, NULL. Difference between == and === ? → == compares values, === compares value + data type. What are superglobals? → Built-in global variables like $_GET , $_POST , $_SESSION , etc. How does PHP handle forms (GET vs POST)? → $_GET shows data in URL; $_POST hides data. POST is safer for sensitive data. Diff...
Comments
Post a Comment