Saturday, 8 June 2013

Pending Interview Questions and Answers

Who is the Father of PHP?
Rasmus Lerdorf


Which programming language does PHP resemble to?
PHP resemble to pearl and C


How can we create a database using PHP and MySQL?
We can create MySQL database in php with the use of
mysql_create_db ("db_name");


Is variable name case sensitive?
Yes, In PHP variable name case sensitive. We cannot start a variable with number like $777name as a valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores.


How can we execute a php script using command line?
Just run the PHP CLI (Command Line Interface) program and provide the PHP script file name as the command line argument. For example, "php myScript.php", assuming "php" is the command to invoke the CLI program.


Differentiate between in_array() and array_search() in php?
in_array : Checks if a value exists in an array. array_search() : Searches an array for a given value and returns the corresponding key if successful.


How do you call a constructor for a parent class?
parent::constructor($value);


How to delete file in PHP ?
unlink($filename);


How to delete variable in PHP ?
unset($variable);


What is the urlencode and urldecode in php ?
Returns a string in which all non-alphanumeric characters except -_. have been replaced with a percent (%) sign followed by two hex digits and spaces encoded as plus (+) signs.


What is the use of the function htmlentities?
htmlentities Convert all applicable characters to HTML entities This function is identical to htmlspecialchars() in all ways, except with htmlentities(), all characters which have HTML character entity equivalents are translated into these entities.


Differentiate between strstr and stristr in php?
strstr() and stristr both are used to find the first occurence of the string only difference is stristr( ) is case insensitive.


How can we know the total number of elements of Array?
sizeof($array);
count($array);


How to secure your website?
  1. Validate Input.
  2. Use Auth & ACL.
  3. Protect my Session ID
  4. Preventing Cross Site Scripting (XSS) flaws
  5. SQL injection vulnerabilities
  6. Turning off error reporting and exposing to the site for hackers
  7. Protect secure data of website


What is PHP configuration file called?
php.ini.


What is a persistent cookie?
A persistent cookie is a cookie which is stored in a cookie permanently on the browser's computer. By default, cookies are created as temporary cookies which stored only in the browser's memory. When the browser is closed, temporary cookies will be erased automatically.


What are non-key columsn in database?
Answer: A non key attribute in sql server is a columns which can not be used to identify a record uniquely for example name or age columns in customer table


Friday, 7 June 2013

Systems Development Life Cycle (SDLC)


SDLC stands for Software Development Life Cycle. 

It is series of process that followed to be make a software successful. In software development, if you follow the process of SDLC, the chance of success of project increase.

Today In IT Industries most of the companies including MNC follow this process. It help to complete the project on timely and with higher success rate.



Benefits of the SDLC Process

The intent of a SDLC process it to help produce a product that is cost-efficient, effective and of high quality. Once an application is created, the SDLC maps the proper deployment and decommissioning of the software once it becomes a legacy. The SDLC methodology usually contains the following stages: Analysis (requirements and design), construction, testing, release, and maintenance (response).






Following are the main steps of SDLC

1. Preliminary Analysis: The objective of phase 1 is to conduct a preliminary analysis, propose alternative solutions, describe costs and benefits and submit a preliminary plan with recommendations.Conduct the preliminary analysis: in this step, you need to find out the organization's objectives and the nature and scope of the problem under study. Even if a problem refers only to a small segment of the organization itself then you need to find out what the objectives of the organization itself are. Then you need to see how the problem being studied fits in with them.Propose alternative solutions: In digging into the organization's objectives and specific problems, you may have already covered some solutions. Alternate proposals may come from interviewing employees, clients , suppliers, and/or consultants. You can also study what competitors are doing. With this data, you will have three choices: leave the system as is, improve it, or develop a new system.Describe the costs and benefits.

2. Systems analysis, requirements definition: Defines project goals into defined functions and operation of the intended application. Analyzes end-user information needs.

3. Systems design: Describes desired features and operations in detail, including screen layouts, business rules, process diagrams, pseudocode and other documentation.

4. Development: The real code is written here.
Integration and testing: Brings all the pieces together into a special testing environment, then checks for errors, bugs and interoperability.

5. Acceptance, installation, deployment: The final stage of initial development, where the software is put into production and runs actual business.

6. Maintenance: What happens during the rest of the software's life: changes, correction, additions, moves to a different computing platform and more. This is often the longest of the stages.