- time: documentation ( source)
- str_repeat: documentation ( source)
- trim: documentation ( source)
<?php
$start = time();
for ($i = 0; $i < 100000; $i++) {
$s = str_repeat(' asd ', 1000);
trim($s);
}
$diff = time() - $start;
echo new DateTime($diff);