Skip to content

Instantly share code, notes, and snippets.

@onfire4g05
Created May 7, 2015 21:14
Show Gist options
  • Save onfire4g05/502469eed532ca22a403 to your computer and use it in GitHub Desktop.
Save onfire4g05/502469eed532ca22a403 to your computer and use it in GitHub Desktop.
Programming Questions
  1. What are your thoughts on TDD (Test Driven Development)?
  2. What coding standards do you follow (code formatting, unit testing, and any tools used like CI, PHPMD, etc)? What tool(s), if any, do you use to debug?
  3. Are you familiar with PHPDoc/JavaDoc standards?
  4. What is SQL injection? Please provide a code example that allows SQL injection and two ways that you can fix it using either mysqli or PDO.
  5. What data type is the following unfiltered query parameter:

index.php?page_id=3

What data type is $_GET['page_id']? How would you change this to another data type?

  1. What will the following return (indicate true or false):
var_dump('1' == 1);  // true/false?
var_dump('1' === 1); // true/false?
var_dump(1 === 1);   // true/false?
var_dump(1 == 1);    // true/false?
  1. What are multi-dimensional arrays?
  2. Do you have any experience in presentational frameworks (Smarty, Twig, etc)?
  3. OOP: In the most basic terms, what is the difference between public, private, and protected methods and properties?
  4. OOP: What is an abstract class? How are traits different than abstract classes?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment