Why does the number increase if you hit refresh
With mod_php the lifetime of the executor (which representes the state of the php interpreter) is longer than the lifetime of a request since the executor is stored in the memory of the apache process. The apache process isn't terminated by default so it can handle new requests after the old request is finished. Basically each apache process has its own executor.
The number N in \0lambda_N must be unique for each executor since this is the name of the function in the function table (which is also stored per executor). The number N is generated from a counter named lambda_count stored in the _zend_executor_globals structure. It gets incremented on each call to create_function.
So if you refresh the page your request gets handled by the same process and the lambda_count seems to increment each time (while experimenting I found out that with refreshing ctrl-f5 or by executing other requests, the number is more random so I assume the process is switches more often).
Does the function stay in memory
The short answer is no. Apparently the function table (among other things like the op arrays) is cleaned after each request in the php_request_shutdown callback. As far as I can see the function entry is still in the hash but the functions opcodes are freed (I could've missed the part where the hash-entries are deleted).
So certain members of the executor are shared across multiple requests, but the sensible ones are cleared out.
I'm not sure how the lifetime of the functions are handled if you use fcgi, where the PHP process also serves more than one request.