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
https://jsonlint.com/ - JSON validation | |
http://www.jsondiff.com/ - JSON comparison |
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
ob_start(); | |
var_dump($variable_to_dump); | |
$results = ob_get_clean(); | |
log_message('error',$results); |
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
$measurement=-hrtime(true); | |
$memory_start = memory_get_usage(TRUE); | |
//Code to measure | |
$memory_end = memory_get_usage(TRUE); | |
$memory_used = ($memory_end - $memory_start)/1048576; | |
$average_memory = ($memory_used * 1024)/$number_of_items; | |
log_message('Error', "$memory_used MB of memory used. Average $average_memory KB per row"); | |
$measurement+=hrtime(true); | |
$measurement = $measurement/1e+9; | |
$number_of_items = count($csv_rows); |