Right to the example…

$identifier = spl_object_hash(function(){
  // some function content
});

Simple as that.

Suggestions or problems ? Write a comment.