export type PhpRuntimeVersion = '8.0' | '8.1' | '8.2' | '8.3' | '8.4' | '8.5'; export type PhpRuntimeValue = object | string | number | boolean | Uint8Array | null | undefined | void; export interface PhpPreloadFile { url: string | URL; path?: string; parent?: string; name?: string; } export interface PhpSharedLibrary { name?: string; url: string | URL; ini?: boolean; getLibs?: () => PhpSharedLibrary[]; getFiles?: () => PhpPreloadFile[]; } export interface PhpRuntimeArgs { autoTransaction?: boolean; version?: PhpRuntimeVersion; 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; [key: string]: object | string | number | boolean | undefined; } export interface PhpBaseModuleFactory { default: new (args: object) => object; } export declare class PhpBase extends EventTarget { constructor(phpBinLoader: Promise, args?: PhpRuntimeArgs, sapi?: string); autoTransaction: boolean; transactionStarted: boolean | Promise; phpVersion?: PhpRuntimeVersion; phpArgs: PhpRuntimeArgs; 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; 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; }