Skip to content

Instantly share code, notes, and snippets.

@Brammm
Last active December 25, 2015 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Brammm/7009248 to your computer and use it in GitHub Desktop.
Save Brammm/7009248 to your computer and use it in GitHub Desktop.
Some useful questions for a PHP interview

PHP interview

  • Are you familiar with the tools we're given in PHP 5.4 to write Object Oriented code?
    We can manipulate scope, have interfaces, abstract classes, traits, namespaces…

  • What's the difference between Public, Protected and Private?
    Public ensures a class method/variable is available everywhere, from any instance of the class. Protected makes the method/variable only available to the class itself and extending classes. Private makes the method/var only accessible to the class itself.

  • Do you know any of these acronyms?

    • DRY "Don't Repeat Yourself"
    • MVC "Model - View - Controller"
    • SOLID "Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion"
  • Do you know Composer, do you use it?
    Composer is a package manager and dependency manager for PHP.

    • Follow up: Would you want to use it, why or why not?
  • Have you heard about the PHP-FIG?
    PHP Framework Interop Group. Group of developers that strives to create standards in PHP. Style standards but also standardized practices for autoloading etc…

  • Have you heard about OWASP and their Top 10 list?

  • A certain page is loading extremely slow. How do you debug and trace the bottleneck?
    You could use a tool like XHProf to profile your page and scan for bottlenecks. New Relic is a handy tool for profiling online applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment