mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-28 18:50:11 +02:00
21 lines
324 B
PHP
21 lines
324 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace DesignPatterns\Creational\Pool;
|
|
|
|
use DateTime;
|
|
|
|
class StringReverseWorker
|
|
{
|
|
private DateTime $createdAt;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->createdAt = new DateTime();
|
|
}
|
|
|
|
public function run(string $text)
|
|
{
|
|
return strrev($text);
|
|
}
|
|
}
|