Skip to content
Quiz · Functions as values · lesson 6 of 8

Quiz — fn and capture

What does the program print?

PHP
<?php

$bonus = 5;
$pay = fn(int $base) => $base + $bonus;
$bonus = 50;
$len = strlen(...);
echo $pay(100), ' ', $len('abcd'), "\n";