This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| https://www.if-not-true-then-false.com/2010/php-timing-class-class-for-measure-php-scripts-execution-time-and-php-web-page-load-time/*/ | |
| class Timing { | |
| private $break; | |
| private $start_time; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /*https://www.if-not-true-then-false.com/2010/php-calculate-real-differences-between-two-dates-or-timestamps/*/ | |
| // Set timezone | |
| date_default_timezone_set("UTC"); | |
| // Time format is UNIX timestamp or | |
| // PHP strtotime compatible strings | |
| function dateDiff($time1, $time2, $precision = 6) { | |
| // If not numeric then convert texts to unix timestamps | |
| if (!is_int($time1)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| /* | |
| From : | |
| https://www.if-not-true-then-false.com/2010/php-class-for-coloring-php-command-line-cli-scripts-output-php-output-colorizing-using-bash-shell-colors/ | |
| with fixes by me | |
| */ | |
| $colors = new Colors(); |