mirror of
https://github.com/super-linter/super-linter.git
synced 2024-11-22 06:01:05 -05:00
26 lines
382 B
PHP
26 lines
382 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* @return array<string>
|
||
|
*/
|
||
|
function helloName(string $name): array
|
||
|
{
|
||
|
return ["hello", $name];
|
||
|
}
|
||
|
|
||
|
function helloSuperLinter(): void
|
||
|
{
|
||
|
$hello = helloName("Super-Linter");
|
||
|
echo implode(" ", $hello) . PHP_EOL;
|
||
|
}
|
||
|
|
||
|
function helloOrWorld(): void
|
||
|
{
|
||
|
$random = rand(0, 10);
|
||
|
if ($random >= 5) {
|
||
|
echo "Hello";
|
||
|
} else {
|
||
|
echo "World";
|
||
|
}
|
||
|
}
|