High school computer science practice tests: PHP (Grades 9–12)
These are US practice tests (grades, CSTA standards). In the UK? Try the UK version →
Free practice tests for high school (grades 9–12): programming practised in PHP – the language behind a huge share of the web – lined up with the CSTA standards for grades 9–12. Every test writes, fixes and predicts real PHP code, run in your browser and graded instantly. For Grades 9–12 (ages 14–18). In the UK, that's Years 10 and 11 (key stage 4).
PHP tests (Grades 9–12)
One test for each unit of the PHP course, plus a mixed test. Write, fix and predict real PHP – it runs in your browser. Learn it first in the PHP course (24 lessons).
How the tests are graded
- Predict: type what a program prints – graded line by line.
- Which message? say whether PHP shows a warning (and carries on), a fatal error (and stops) or a parse error (nothing runs).
- Trace tables and order: fill in a variable's values, or put mixed-up lines into a working order.
- Write it and fix it: your PHP runs in your browser against the example and hidden tests with other values and other form data, so it has to work every time.
Everything is graded by Classfern in your browser, straight away. Your code is never sent to us. The first code question downloads PHP itself (about 3 MB, once).
Learn first
The Programming Department has the full PHP course: 24 lessons, each with teaching, a worked example, practice and homework, starting with Lesson 1: echo, strings and the PHP tag.
Classfern practice material. Not an official test and not affiliated with or endorsed by any state, testing program, exam board or the CSTA. Classfern is not affiliated with or endorsed by The PHP Group. PHP runs here as php-wasm, under its open-source licences.
Lines up with the CSTA K–12 Computer Science Standards (2017) for grades 9–12; the descriptions are our own words.