Which line does this program print?

from Exceptions
PHP 8.3.33 beginner 2 min

Which line does this program print?

php
<?php
final class StockFailure extends RuntimeException {}
try {
    throw new StockFailure('empty');
} catch (StockFailure $error) {
    echo "specific\n";
} catch (RuntimeException $error) {
    echo "broad\n";
}
Open in playground
Report an error