PHP Interview Questions and answers

Prepare for your next php based interview with high confidence

Your Ad Here

  • Interview Tips
  • Php Jobs
  • PHP Quiz List
  • PHP Tester
  • Share your PHP interview experience
  • Links

  • Categories

    • PHP Questions RSS (50)
      • Regular level RSS (24)
      • Advanced level RSS (15)
      • Expert level RSS (9)
    • MySql Questions RSS (7)
      • Regular level RSS (4)
      • Advanced level RSS (2)
      • Expert level RSS (1)
    • CMS Questions RSS (11)
      • Drupal RSS (10)
    • Framework questions RSS (4)
      • cakephp RSS (4)
  • List of questions- pdf

    click here
  • Tags

    arrays array_combine array_walk array_walk_recursive by-reference cakephp cakephp interview clientside cms cookies document drupal echo existence explode form framework get header hijacking include Interview interviews Iteration ob_start oop php PHP Questions php security post print redirect Regex register request resultset serverside sessions sort SP's split sql injections sql joins Strings variables
  • Strings and regular expressions

      0 comments
      18th Jun 10
      Bart

    What will be the answer of the following code snippet?

    echo 'Testing ' . 1 + 2 . '45';
    

    Simply you will give the answer as : Testing 345

    But the answer is : 245

    That is because you can not sum a number with a string. The first part, before the plus mark is a string though there is 1 there.
    So engine will simply get it as 0 and the latter part as 245. so answer will be 245.

    Related posts:

    1. Strings and Regular Expressions
    2. String Concatenation and regular expressions
    3. Regular expressions
    4. strings and variable interpolation
    5. function return value
      PHP Questions, Regular level
      Interview, Regex, Strings

    Write a comment

    Click here to cancel reply.




  • Linked

    • Facebook Fan Page
    • Twitter
  • Related Posts

    1. Strings and Regular Expressions
    2. String Concatenation and regular expressions
    3. Regular expressions
    4. strings and variable interpolation
    5. function return value
  • Recent Posts

    • What is the use of “Final class” and can a final class be an abstract?
    • Explain abstract class and its behaviour?
    • Write a small function to calculate n to the power of n?
    • Explain drupal flow of information among 5 main layers
    • Mention two useful shorcut functions available globally in cake php
    • What are the two new error levels introduced in PHP5.3?
    • Late static binding php5
    • back to the basics
    • sessions and cookies
    • Oral php interview questions
  • Contact Us

    Captcha image for Custom Contact Forms plugin. You must type the numbers shown in the image
    Wordpress plugin expert and Rockville Web Developer Taylor Lovett
Copyright © PHP Interview Questions and answers .All rights reserved.  Online Marketing  Web Directory