Use getenv to prevent undefined key warning
Fix GH-12962: Double free of init_file in phpdbg_prompt.c See GH-12962 for analysis. Closes GH-12963.