← All tasks
🧮
Programming Intermediate

Write a match Expression for a Status Label

⏱ 3 min ⭐ 90 XP 🔁 3 attempts allowed

What you'll do

Write the PHP match expression that returns a human-readable label for a numeric $status code (1, 2, or default 'Unknown').

Scenario

An order's numeric status needs to be shown as text in the UI: 1 => 'Pending', 2 => 'Shipped', anything else => 'Unknown'.

Ready to try it?

Create a free account and try "Write a match Expression for a Status Label" free for 7 days, no card required. Earn 90 XP and track your internship progress.

Already have an account? Sign in