What does this program print?

from Traits
PHP 8.3.33 intermediate 2 min

What does this program print?

php
<?php
trait ShortLabel
{
    public function label(): string { return 'short'; }
}
trait DetailedLabel
{
    public function label(): string { return 'detailed'; }
}
final class Labeler
{
    use ShortLabel, DetailedLabel {
        DetailedLabel::label insteadof ShortLabel;
        ShortLabel::label as compactLabel;
    }
}
$labeler = new Labeler();
echo $labeler->label(), PHP_EOL;
echo $labeler->compactLabel(), PHP_EOL;
Open in playground
Report an error