- Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.25, 8.4.1 - 8.4.12
- 14 12 35
<?php
$tests = ['1.2', '1.0', '2.11'];
foreach ($tests as $test) {
sscanf($test, '%d.%d', $years, $months);
$months += $years * 12;
echo $months . PHP_EOL;
}