memory_reset_peak_usage

(PHP 8 >= 8.2.0)

memory_reset_peak_usageReset the peak memory usage

Descrizione

memory_reset_peak_usage(): void

Resets the peak memory usage returned by the memory_get_peak_usage() function.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Nessun valore viene restituito.

Esempi

Example #1 memory_reset_peak_usage() example

<?php

var_dump
(memory_get_peak_usage());

$a = str_repeat("Hello", 424242);
var_dump(memory_get_peak_usage());

unset(
$a);
memory_reset_peak_usage();

$a = str_repeat("Hello", 2424);
var_dump(memory_get_peak_usage());

?>

Il precedente esempio visualizzerĂ  qualcosa simile a:

int(422440)
int(2508672)
int(399208)

Vedere anche:

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top