<?php
function calculateReadTime($text)
{
    $wordCount = str_word_count(strip_tags($text));
    $minutes = ceil($wordCount / 200); // assuming 200 words per minute reading speed
    return max(1, $minutes);
}