php2go/fixtures/0013-closures.php

10 lines
104 B
PHP

<?php
const FOO = 'X';
$x = function(string $param): string {
return $param . FOO;
};
echo $x("x");