Hey you all I got a time calculation question. I'm attempting to do a lot of PHP and AJAX code appending to HTML. I want to know if my code below will accurately calculate the time of entire code being executed or solely just the PHP code. If it just calculates the PHP, what other code can I add to give me an accurate length of time it takes for the code to execute.
<?php
$before = microtime(true);
/*
A bunch of PHP Code
*/
?>
<!DOCTYPE html>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script>
$(function () {
/*
A bunch of Jquery Code
*/
});
</script>
<body>
A Lot of HTML Code
</body>
</html>
<?php
$after = microtime(true);
echo ($after-$before);
?>