PHP: Forming strings with loops
Instructions
Loading...
Your exercise will be checked with these tests:
<?php
namespace HexletBasics\Loops\ReverseString;
use PHPUnit\Framework\TestCase;
class SolutionTest extends TestCase
{
public function test()
{
require 'index.php';
$this->assertEquals('got', mysubstr('got', 3));
$this->assertEquals('go', mysubstr('got', 2));
$this->assertEquals('g', mysubstr('got', 1));
}
}
Teacher's solution will be available in:
20:00
