PHP Community Marketing Expert

  Home  Social Networking And Marketing  PHP Community Marketing Expert


“PHP Community Marketing Expert based Frequently Asked Questions by expert members with experience as PHP Community Marketing Expert. These questions and answers will help you strengthen your technical skills, prepare for the new job test and quickly revise the concepts”



61 PHP Community Marketing Expert Questions And Answers

22⟩ Explain how does one prevent the following Warning ‘Warning Cannot modify header information – headers already sent’ and why does it occur in the first place?

Do not output anything to the browser before using code that modifies the HTTP headers. Once you call echo or any other code that clears the buffer you can no longer set cookies or headers. That is also true for error messages, so if an error happens before you use the header command and the INI directive display_errors is set then that will also cause that error to show.

 186 views

23⟩ Explain how can we increase the execution time of a PHP script?

☛ Default time allowed for the PHP scripts to execute is 30 secs mentioned in the php.ini file. The function used is set_time_limit(int sec). If the value passed is ‘0’, it takes unlimited time. It should be noted that if the default timer is set to 30 sec, and 20 sec is specified in set_time_limit(), the script will run for 45 seconds.

☛ This time can be increased by modifying the max_execution_time in secs. The time must be changed keeping the environment of the server. This is because modifying the execution time will affect all the sites hosted by the server.

☛ The script execution time can be increased by

☛ Using sleep() function in PHP script

☛ Using set_time_limit() function

☛ The default limit is 30 seconds. The time limit can be set to zero to impose no time limit to pause.

 171 views

24⟩ Explain what is meant by PEAR in PHP?

PEAR is an acronym for “PHP Extension and Application Repository” The purpose of PEAR is to provide:

☛ A structured library of open-sourced code for PHP users

☛ A system for code distribution and package maintenance

☛ A standard style for writing code in PHP

☛ PHP Foundation Classes (PFC)

☛ PHP Extension Community Library (PECL)

☛ A website, mailing lists and download mirrors to support the PHP/PEAR community

 173 views

25⟩ Explain what Kind of Reports do you Give to your Clients?

I like numbers. So maybe I might be biased towards this question but for me, measuring things is very important. In SEO we are always having to justify our ROI and one of the ways you can prove it is through reporting. Generally speaking, once a candidate comes from an agency background I would expect reporting to be almost inbred as clients always want to justify their SEO spend. However, I'm interested in what metrics the applicant think are important across both search and social. I'm also keen on hearing how they usually present this data and the frequency at which is delivered.

 164 views

26⟩ why Do You Want To Work For Us Here?

It’s rare for an interview not to include this question.

The good news is that it’s an easy one to prepare for.

Most companies want to recruit people who are enthusiastic about the company and its products. They don’t want people on the team who “ended up there by accident”. So this is your chance to show why working for the company is important to you and why you think you will fit in.

They will be looking for evidence that you can make a contribution and will be able to grow into the role they are recruiting.

This question is designed to screen out candidates who aren’t serious about the company or may be using it as a stop-gap, while they look for something better.

It’s also your chance to make the most of the company research you have done. You can use this opportunity to add comments that show you understand the company’s position in the market place; the role of its competitors and any challenges it may be facing.

Sample Answer: “I'm not looking for just another pay check. I enjoy my work and am proud of my profession. Your company produces a superior product/provides a superior service. I share the values that make this possible, which should enable me to fit in and complement the team."

 172 views

28⟩ Tell us why did you choose this particular career path?

Sometimes in interviews, you will be asked questions that lend themselves to be answered vaguely or with lengthy explanations. Take this opportunity to direct your answer in a way that connects you with the position and company, be succinct and support your answer with appropriate specific examples.

Sample Answer: "I chose advertising because I have always been a strong communicator with a good eye for design. I have a particular interest in creating dynamic eye-catching pieces that support a new product being introduced to the market. I also like the fast-paced high-energy environment that seems to be commonplace in the advertising industry."

Advice: Your answer needs to convince the interviewers that your skills are exactly what they want. They want to know if you have a realistic view of what it is like to work in their industry. Be specific; show them that their industry and your career goals are in sync.

 172 views

29⟩ Explain 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.

☛ Remember that if your PHP script was written for the Web CGI interface, it may not execute properly in command line environment.

 161 views

30⟩ Tell me how comfortable are you with writing HTML entirely by hand?

Although their resume may state that they're an HTML expert, often times many developers can't actually write an HTML document from top to bottom. They rely on an external publisher or have to constantly flip back to a reference manual. Any developer worth a damn should at least be able to write a simple HTML document without relying on external resources. A possible exercise is to draw up a fake website and ask them to write the HTML for it. Keep it simple and just make sure they have the basics down - watch for mistakes like forgetting the <head> </head> tags or serious misuse of certain elements. If they write something like: <image src="/some/image.gif">, it might be a good hint to wrap things up and call the next interviewee.

 173 views

31⟩ Tell me what have you been doing since your last job?

If you have an employment gap on your resume, the interviewer will probably ask you what you have been doing while you were out of work.

The best way to answer this question is to be honest, but do have an answer prepared. You will want to let the interviewer know that you were busy and active, regardless of whether you were out of work by choice, or otherwise.

As I said, it doesn't really matter what you did, as long as you have an explanation. Hiring managers understand that people lose their job - it can happen to anyone - and it's not always easy to find a new job fast. Also, there are legitimate non-employment reasons for being out of the workforce.

 140 views

34⟩ Do you know what does MVC stand for and what does each component do?

MVC stands for Model View Controller.

The controller handles data passed to it by the view and also passes data to the view. It’s responsible for interpretation of the data sent by the view and dispersing that data to the appropriate models awaiting results to pass back to the view. Very little, if any business logic should be occurring in the controller.

The model’s job is to handle specific tasks related to a specific area of the application or functionality. Models will communicate directly with your database or other storage system and will handle business logic related to the results.

The view is passed data by the controller and is displayed to the user.

Overall, this question is worth knowing as the MVC design pattern has been used a lot in the last few years and is a very good design pattern to know. Even with more advanced flows that go down to repositories and entities, they still are following the same basic idea for the Controller and View. The Model is typically just split out into multiple components to handle specific tasks related to database data, business logic etc. The MVC design pattern helps draw a better understanding of what is being used, as a whole, in the industry.

 196 views

35⟩ Do you Code in any other Programming Language?

Whilst not a deal breaker, I think it is important that you understand how things are built on the web. Especially knowing how to fully code in html. The more web programming you know the better, and working closely with the dev team has constantly reminded me why this is important. There will be plenty of cases where being able to understand a web development language will be very advantageous. When for instance, the dev team says there is no space for particular piece of content , recommending a work around using a CSS overlay and calling it using an onClick event maybe accepted. Or telling them that how best to code in Google's language alternative tag across an already existing international site.

 170 views

37⟩ Tell me what is the difference between GET and POST?

☛ GET displays the submitted data as part of the URL, during POST this information is not shown as it’s encoded in the request.

☛ GET can handle a maximum of 2048 characters, POST has no such restrictions.

☛ GET allows only ASCII data, POST has no restrictions, binary data are also allowed.

☛ Normally GET is used to retrieve data while POST to insert and update.

Understanding the fundamentals of the HTTP protocol is very important to have a good start as a PHP developer, and the differences between GET and POST are an essential part of it.

 175 views

38⟩ Suppose we receive a form submitted by a post to subscribe to a newsletter. This form has only one field, an input text field named email. How would we validate whether the field is empty? Print a message "The email cannot be empty" in this case?

<?php

if(empty($_POST['email'])){

echo "The email cannot be empty";

}

?>

In this question, you will be evaluated on your knowledge about forms management and validation. There is not unique answer for this question, but it must be similar to this one.

 191 views

39⟩ Explain why would we use === instead of ==?

If you would want to check for a certain type, like an integer or boolean, the === will do that exactly like one would expect from a strongly typed language, while == would convert the data temporarily and try to match both operand’s types. The identity operator (===) also performs better as a result of not having to deal with type conversion. Especially when checking variables for true/false you want to avoid using == as this would also take into account 0/1 or other similar representation.

 228 views

40⟩ Tell me what is htaccess? Why do we use this and where?

☛ htaccess files are configuration files of Apache Server that provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.

☛ These .htaccess files are used to change the functionality and features of Apache web server.

For instance, htaccess file is used for url rewrite.

–> It is used to make the site password protected.

–> .htaccess file can restrict some ip addresses so that on restricted ip addresses, the site will not open.

 171 views