la butto lì... poi aspetta altre risposte...

$id = 5;

$id_cryptato = ($id *$id)^$id;