Quiz · PHP and the web · lesson 7 of 7
Quiz — filter_var and an allowlist
What does the program print (lines separated by spaces)?
<?php
$age = filter_var('42abc', FILTER_VALIDATE_INT);
$email = filter_var('ann@site.ru', FILTER_VALIDATE_EMAIL);
$sort = 'price';
$ok = in_array($sort, ['name', 'price'], true);
var_dump($age, $email, $ok);