Php Execution Time Snippets


03 March, 2011   

Count Script Execution Time

28 October, 2013   

C code example how to measure time of execution

04 May, 2011   

Need to people out if they have been inactive for too long? Do it with this piece of code. Introduction ----------------------- This takes 3 functions to complete the inactive session task. 1. We need to check if the person is actually logged in using our isLogged function 2. We need the function to check the time the page loaded, and when...

27 May, 2013   

Example shows here how to compress CSS with PHP

29 October, 2011   

Here shown an example how to Compress CSS with PHP

30 March, 2011   

Need to people out if they have been inactive for too long? Do it with this piece of code. This takes 3 functions to complete the inactive session task. 1. We need to check if the person is actually logged in using our isLogged function 2. We need the function to check the time the page loaded, and when the last page was loaded 3. We need a...

21 January, 2011   

Sometimes the time set on your server isn't accurate to what your local time is. If you can't change it, you can adjust it yourself. If your server thought it was 12 midnight, but it was really 7 pm, this will roll the $today variable back five hours to be correct.

C source code example for using struct tm, time_t, and time to create a simple clock

PHP code to convert MySQL date to UNIX timestamp

PHP code example to get All-Time Number of MySQL Queries

This will return the number of seconds between now and when the time field was inserted.

22 June, 2014   

To test in other timezones, replace '-5' with your local standard time GMT offset.

Have you ever wanted to know how much memory one of your PHP scripts uses when it runs? You might want this information if your script has a memory leak or takes a long time to execute. If that's the case then there's a great built-in function called memory_get_usage, which will display the exact amount of memory being used by your script. This...

By default, Delphi gets its date/time, currency and numeric format from Control Panel's International settings. We can set the constants defined in Delphi, like DecimalSeparator, ShortDateFormat and others like in the code below. To a complete list of these variables, look at Currency and date/time formatting variables in Delphi Help.

14 June, 2015   

This function helps you checking a UNIX timestamp with human readable time formats like 1m, 2d or 4y.

26 December, 2011   

Example PHP code to navigate calender in HTML pages

This function returns the duration of the given time period in days, hours, minutes and seconds. For example: echo convertSecToStr('654321'); would return "7 days, 13 hours, 45 minutes, 21 seconds"

23 January, 2013   

Adjusted for daylight saving or standard time as appropriate.

06 June, 2012   

This function highlight_string() outputs or returns a syntax highlighted version of the given PHP code using the colors defined in the built-in syntax highlighter for PHP.

02 November, 2016   

A PHP template for dealing with any sort of error