Perfect
10+ Shj International Interview Questions and Answers
Q1. What is array and how many types of data types in PHP?
An array is a data structure that stores multiple values in a single variable. PHP has several data types including string, integer, float, boolean, and more.
PHP arrays can hold values of different data types.
There are indexed arrays, associative arrays, and multidimensional arrays in PHP.
Indexed arrays use numeric keys to access values.
Associative arrays use named keys to access values.
Multidimensional arrays are arrays within arrays.
Q2. How do you create a simple form in PHP using HTML and display in Web Browser?
To create a simple form in PHP using HTML and display in a web browser, you need to write HTML code for the form and embed PHP code to handle form submission.
Create an HTML form with input fields for user input
Use PHP code to process form data and display results
Save the file with a .php extension to enable PHP code execution
Q3. What Is PHP and how it is helpful in website development?
PHP is a server-side scripting language used for web development.
PHP stands for Hypertext Preprocessor.
It is an open-source language and can be embedded in HTML.
PHP is used for creating dynamic web pages and web applications.
It can interact with databases and handle forms and cookies.
Popular websites like Facebook, Wikipedia, and WordPress are built using PHP.
Q4. What is Javascript and how it is helpful in Core PHP to develop your website?
Javascript is a scripting language used for web development. It can be used with Core PHP to add interactivity to websites.
Javascript is a client-side scripting language that runs in the browser
It can be used to add interactivity to websites, such as form validation and dynamic content
Core PHP is a server-side scripting language used to generate HTML pages
Javascript can be used with Core PHP to create dynamic web pages
For example, you can use Javascript to create a form that ...read more
Q5. What is OOPS concept in PHP and how it is effective in your coding?
OOPS in PHP is a programming paradigm that uses objects to represent real-world entities and their interactions.
OOPS stands for Object-Oriented Programming System
It allows for encapsulation, inheritance, and polymorphism
Classes and objects are used to represent real-world entities and their interactions
Example: A class 'Car' can have properties like 'model', 'color', and 'price', and methods like 'start', 'stop', and 'accelerate'
OOPS makes code more modular, reusable, and eas...read more
Q6. What are PHP Variables and how many types of Variables in PHP?
PHP variables are containers for storing data values. There are 4 types of variables in PHP.
PHP variables start with a $ sign followed by the variable name
PHP has 4 types of variables: string, integer, float, and boolean
Variables can be assigned values using the assignment operator (=)
Variables can be used in expressions and can be concatenated with strings
Example: $name = 'John'; $age = 25; $salary = 2500.50; $isEmployed = true;
Q7. What is Constructor and Destructor and what is Class and How it is related with Object?
Constructor and Destructor are special methods in a class that are used to create and destroy objects respectively.
Constructor is a method that is called when an object of a class is created.
Destructor is a method that is called when an object is destroyed.
Class is a blueprint or template for creating objects.
Object is an instance of a class.
Constructor and Destructor are related to Class and Object as they are used to create and destroy objects respectively.
Q8. What is Call by Value and Call by Reference and how it works in your coding?
Call by Value passes a copy of the value, while Call by Reference passes a reference to the value.
Call by Value passes a copy of the value to the function, so any changes made to the value inside the function do not affect the original value outside the function.
Call by Reference passes a reference to the value to the function, so any changes made to the value inside the function affect the original value outside the function.
In Call by Value, the original value is not modifi...read more
Q9. Tell me about HTML and how PHP related to HTML?
HTML is a markup language used for creating web pages, while PHP is a server-side scripting language used for dynamic web development.
HTML stands for HyperText Markup Language and is used to create the structure of web pages.
PHP stands for Hypertext Preprocessor and is used for server-side scripting to generate dynamic content on web pages.
HTML is static, while PHP allows for dynamic content generation based on user input or database interactions.
PHP code can be embedded with...read more
Q10. What is MySQL Database Connectivity to PHP?
MySQL Database Connectivity to PHP is a way to connect PHP scripts to MySQL databases.
MySQLi and PDO are two PHP extensions used for database connectivity.
MySQLi is an object-oriented extension while PDO is a data access abstraction layer.
Both extensions provide methods to connect to MySQL databases, execute queries, and fetch results.
Example: $conn = new mysqli($servername, $username, $password, $dbname);
Example: $conn = new PDO('mysql:host=$servername;dbname=$dbname', $user...read more
Q11. What is trigger and it is useful in PHP?
A trigger is a piece of code that automatically executes when an event occurs in a database.
Triggers are useful for enforcing business rules and data integrity.
They can be used to audit changes to data in a database.
In PHP, triggers can be created using the mysqli extension or PDO.
Examples of trigger events include INSERT, UPDATE, and DELETE operations on a table.
Q12. Php array and its definition and its functionality
Php array is a data structure that stores multiple values under a single variable name.
Arrays can hold values of different data types
Values in an array are accessed using their index number
Arrays can be created using the array() function or shorthand []
Arrays have various built-in functions for manipulation
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month