Visualizzazione dei risultati da 1 a 2 su 2

Discussione: unset tutto

  1. #1

    unset tutto

    ciao
    se distruggo tutte le variabili allocate
    es. così:
    Codice PHP:
    function unset_all_vars($a)
    { foreach(
    $a as $key => $val)
      { unset(
    $GLOBALS[$key]); }
      return 
    serialize($a); }

    unset_all_vars(get_defined_vars()); 
    http://it2.php.net/manual/it/function.unset.php#39397


    non dovrei avere ~0 kB di memoria allocata?

    mentre mi appare:

    valore prima: 901.4375

    valore dopo: 809.3125

    Codice PHP:
    echo '
    '
    .(memory_get_usage()/1024).'
    '

    come mai?
    There are 10 types of people in the world: Those who understand binary, and those who don't.

  2. #2
    hmmmm

    le costanti !!! arghhhh

    e quelle non le posso cancellare vero?



    [edit]
    volendo....
    http://it2.php.net/runkit_constant_remove
    There are 10 types of people in the world: Those who understand binary, and those who don't.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.