| 1 | <?php |
||
| 7 | class FunctionsTest extends TestCase |
||
| 8 | { |
||
| 9 | private $cases = [ |
||
| 10 | [0, 0, "1979-11-30 00:00:00", "1979-11-30 00:00:01"], |
||
| 11 | [1, 0, "1979-11-30 00:00:02", "1979-11-30 00:00:03"], |
||
| 12 | [0, 33, "1980-01-01 00:00:00"], |
||
| 13 | [43507, 19583, "2018-03-31 21:15:38"], |
||
| 14 | ]; |
||
| 15 | |||
| 16 | |||
| 17 | /** |
||
| 18 | * @throws \Exception |
||
| 19 | */ |
||
| 20 | public function testDos2DateTime() |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @throws \Exception |
||
| 29 | */ |
||
| 30 | public function testDateTime2Dos() |
||
| 44 | } |
||
| 45 |
If the size of the collection does not change during the iteration, it is generally a good practice to compute it beforehand, and not on each iteration: