Quiz · PHP and the web · lesson 3 of 7
Quiz — a query parameter with ??
Question 1 of 2
What does the program print for the request ?page=3&q= (lines separated by spaces)?
<?php
$_GET = ['page' => '3', 'q' => ''];
$page = (int) ($_GET['page'] ?? 1);
$limit = (int) ($_GET['limit'] ?? 20);
$q = $_GET['q'] ?? 'all';
var_dump($page, $limit, $q);