export type PhpRuntimeVersion = '8.0' | '8.1' | '8.2' | '8.3' | '8.4' | '8.5'; export type PhpRuntimeVariant = '' | '_sdl'; export type PhpRuntimeValue = object | string | number | boolean | Uint8Array | null | undefined | void; export type PhpTemplateValue = PhpRuntimeValue | Array; export interface PhpPreloadFile { url: string | URL; path?: string; parent?: string; name?: string; } export interface PhpSharedLibrary { name?: string; url: string | URL; ini?: boolean; getLibs?: Function; getFiles?: Function; } export interface PhpVhost { pathPrefix: string; directory: string; entrypoint: string; } export interface PhpRuntimeArgs { autoTransaction?: boolean; version?: PhpRuntimeVersion; variant?: PhpRuntimeVariant; interactive?: boolean; script?: string; code?: string; shared?: Record; locateFile?: (path: string, directory?: string) => string | URL | undefined; files?: PhpPreloadFile[]; sharedLibs?: Array; dynamicLibs?: Array; debug?: boolean; ini?: string; persist?: object; staticFS?: boolean; vHosts?: PhpVhost[]; [key: string]: object | string | number | boolean | Function | undefined; } export interface PhpBaseModuleFactory { default: new (args: object) => object; } export interface PhpBinaryRuntime { inputDataQueue?: string[]; awaitingInput?: ((value: string | undefined) => void) | null; triggerStdin?: () => void; persist?: boolean; ccall?: Function; lengthBytesUTF8?: Function; _malloc?: Function; _free?: Function; stringToUTF8?: Function; setValue?: Function; UTF8ToString?: Function; getValue?: Function; HEAP8?: Int8Array; hasVrzno?: boolean; zvalToJS?: Function; onRefresh?: Set; FS?: { syncfs?: (populate: boolean, callback: (error?: Error) => void) => void; } & object; } export declare class PhpBase extends EventTarget { constructor(phpBinLoader: Promise, args?: PhpRuntimeArgs, sapi?: string); autoTransaction: boolean; transactionStarted: boolean | Promise; phpVersion?: PhpRuntimeVersion; phpVariant?: PhpRuntimeVariant; phpArgs: PhpRuntimeArgs; queue: Array<[Function, Array, (value?: PhpRuntimeValue) => void, (reason?: object | string | number | boolean | Error) => void]>; binary: Promise; inputString(byteString: string): void; input(items: Iterable): void; flush(): void; tokenize(phpCode: string): string[]; startTransaction(): Promise; commitTransaction(readOnly?: boolean): Promise; run(phpCode: string): Promise; exec(phpCode: string): Promise; x(fragments: TemplateStringsArray, ...values: PhpTemplateValue[]): Promise; r(fragments: TemplateStringsArray, ...values: PhpTemplateValue[]): Promise; refresh(): Promise; analyzePath(path: string): Promise; readdir(path: string): Promise; readFile(path: string, options?: object): Promise; stat(path: string): Promise; mkdir(path: string): Promise; rmdir(path: string): Promise; rename(path: string, newPath: string): Promise; writeFile(path: string, data: string | Uint8Array | ArrayBufferLike | Iterable, options?: object): Promise; unlink(path: string): Promise; }