السلام عليكم و رحمة الله تعالى و بركاته
كيف حالكم شباب أتمنى تكونو بخير .
اليوم سأضع لكم كود code معرفة وقت تنفيذ كود code صفحة مع شرح طريقةه
أولا الكود code كامل
رمز PHP:
<code style="white-space:nowrap"> <code> <?php
$time_start = microtime(true);
$time_end = microtime(true);
$time = $time_end - $time_start;
echo"<center>";
echo'إستغرقت الصفحة ';
echo'<br/>'.$time.'';
echo'<br/>ثانية لتنفذ';
echo"</center>"
?> </code> </code>
المتغير
رمز PHP:
<code style="white-space:nowrap"> <code> $time_start = microtime(true);
</code> </code>
بداية الوقت
المتغير
رمز PHP:
<code style="white-space:nowrap"> <code> $time_end = microtime(true);
</code> </code>
نهاية الوقت
المتغير
كود code :
رمز PHP:
<code style="white-space:nowrap"> <code> $time = $time_end - $time_start;
</code> </code>
يقوم بعملية الطرح
بداية الوقت - نهاية الوقت
إضغط على الصورة أسفله للتجريب
المصدر