Features — PHP Technical Interview Questions & Answers

Features

Features

  • Features worth saying: runs on the server, embeds in HTML, talks to MySQL/Postgres, sessions and cookies for login, huge hosting, lots of libraries (Composer). Cross-platform: Windows XAMPP or Linux.
  • Don’t dump twenty marketing bullets. Four is enough: server-side, $variables, forms ($_POST), database with PDO/mysqli.
  • Trap: listing ‘easy’ and ‘open source’ with no echo example.

Technical Interview Tip: Four features: server, forms, session, MySQL. Then echo.

Code Examples for Features

Features — working example

<?php
// Features
$scores = [80, 90, 70];
$avg = array_sum($scores) / count($scores);
echo "avg=" . number_format($avg, 1) . "\n";
foreach ($scores as $s) {
  if ($s >= 80) echo "high: $s\n";
}

Features: scores array, print avg, then high marks. Say the output.

How to Explain Features to an Interviewer

Name four PHP features.

Server-side Forms $_POST Sessions Talks to MySQL