Skip to main content

Openings for different technoogies.

PHP Interview Questions

1) What is the difference between strstr & stristr?

For strstr, the syntax is: string strstr(string $string,string $str ); The function strstr will search $str in $string. If
it finds the string means it will return string from where it finds the $str upto end of $string.
For Example:
$string = "http://yahoomail.com";
$str="yahoomail";
The output is "yahoomail.com". The main difference between strstr and stristr is of case sensitivity. The
former consider the case difference and later ignore the case difference.

2) What is the difference between explode and split?
Split function splits string into array by regular expression. Explode splits a string into array by string.
For Example:
explode(" and", "India and Pakistan and Srilanka");
split(" :", "India : Pakistan : Srilanka");
Both of these functions will return an array that contains India, Pakistan, and Srilanka.

3) How can you avoid execution time out error while fetching record from MySQL?
set_time_limit -- Limits the maximum execution time
For Example:
set_time_limit(0);
If you set to 0 you say that there is not limit.

4) Write a SQL query that displays the difference between the highest and lowest salaries of a database table
"employees". Label the column as DIFFERENCE.
Select max(sal)-min(sal) as Difference from employees;

5) What is the difference between require() and include()?

Both of these constructs includes and evaluates the specific file. The two functions are identical in every way
except how they handle failure. If filepath not found, require() terminates the program and gives fatal error,
but include() does not terminate the program; It gives warning message and continues to program.
include() produces a Warning while require() results in a Fatal Error if the filepath is not correct.

Comments

Popular posts from this blog

Openings for different technoogies.

 

We are Hiring Mobile Engineer Lead

Experience required for the Job: 8 - 10 years Job Location: Bengaluru/Bangalore Invensys Skelta is looking for Lead Mobile app engineers to drive the mobile strategy globally for its multiple products. The candidate should be enthusiastic to further the knowledge of cross-platform and multi-platform development and who makes things happen. Successful candidate will work closely with the project managers and development team globally to develop ideas, concepts, and solutions for mobile apps that help the brand meet their objectives. Person Specification: *    An expert in either iOS, Android or Windows Phone 8 *    Passion for Research & Development, and believes in simple, intuitive and scalable mobile applications that can help solve some of the biggest and complex problems *    An interest in techniques for producing portable cross-platform code and an attention to detail in all aspects of the development process; whether it"s making yo...

Looking for Drupal Themer

Location : Bangalore Position : Drupal Themer Job Responsibilities: • Work with Drupal Developer in porting pages to Drupal • Responsible for building Drupal themes and template files for themes for requirements specified Preferred profile: Strong Knowledge of Drupal coding standards. Strong grasp of semantic, HTML and CSS based design • Experience in converting PSDs and into functional Drupal themes from scratch • Experience in creating well-commented, Zen-based subthemes (http://drupal.org/project/zen) from provided layered Photoshop compositions, including creating and editing templates for different node-types and pages, editing .info files, and adding additional theme settings using the Drupal Form API. • Experience in adding, editing and deleting pages, users, user groups, blocks, and block areas on a pre-existing Drupal installation based on provided directions, text, pictures and wireframes • Experience in testing and modifying Drupal themes and stylesheets to ensure consistent...