> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# getgenv

> Tra ve current executor environment table bang cach pushing LUA_ENVIRONINDEX. Function khong nhan arguments, tra ve exactly one value, va khong co registered alias. Call-sites trong repository dung returned table de doc va ghi shared executor globals nhu __siApiCache va saveinstance.

<div className="real-function-page">
  ```lua theme={null}
  getgenv(): table
  ```

  ## Giá trị trả về

  <ResponseField name={"environment"} type={"table"}>
    Table hien duoc luu tai LUA\_ENVIRONINDEX cho state nay.
  </ResponseField>

  ## Ví dụ

  Read and write values on the current executor environment table.

  ```lua theme={null}
  local env = getgenv()

  env.RealDocsValue = "ready"

  print(getgenv().RealDocsValue)
  ```
</div>
