Skip to content
Quiz · Errors and exceptions · lesson 7 of 8

Quiz — finally and a custom exception

Question 1 of 2

What does the program print?

PHP
<?php

function load(): string
{
    try {
        return 'data';
    } finally {
        echo 'closed ';
    }
}

echo load(), "\n";