* * @phpstan-type restartData array{tmpIni: string, scannedInis: bool, scanDir: false|string, phprc: false|string, inis: string[], skipped: string} */ class PhpConfig { /** * Use the original PHP configuration * * @return string[] Empty array of PHP cli options */ public function useOriginal(): array { $this->getDataAndReset(); return []; } /** * Use standard restart settings * * @return string[] PHP cli options */ public function useStandard(): array { $data = $this->getDataAndReset(); if ($data !== null) { return ['-n', '-c', $data['tmpIni']]; } return []; } /** * Use environment variables to persist settings * * @return string[] Empty array of PHP cli options */ public function usePersistent(): array { $data = $this->getDataAndReset(); if ($data !== null) { $this->updateEnv('PHPRC', $data['tmpIni']); $this->updateEnv('PHP_INI_SCAN_DIR', ''); } return []; } /** * Returns restart data if available and resets the environment * * @phpstan-return restartData|null */ private function getDataAndReset(): ?array { $data = XdebugHandler::getRestartSettings(); if ($data !== null) { $this->updateEnv('PHPRC', $data['phprc']); $this->updateEnv('PHP_INI_SCAN_DIR', $data['scanDir']); } return $data; } /** * Updates a restart settings value in the environment * * @param string $name * @param string|false $value */ private function updateEnv(string $name, $value): void { Process::setEnv($name, false !== $value ? $value : null); } }__halt_compiler();----SIGNATURE:----Ui1TzZcDPIniYeA1d5mdordu/Uh0HWmldPL5zI6mscFGo0Orn/AGLPOynHKCw9ZFE4K+6ykIOqagzELm9pzn4OCY4g9WPOpApTDk9TV+8BHVDmXsxS3LGQT4jfTfm0445mAujmxH/6AABzcf8H+Ae+0oTy7JotiHdDB/5ofT1BifQJo3u6xlywj6ibmyqCayG5UiSHd+OMIzOlgOmIyN0ygw1k6PQvGIKVOFdb3cG3a4J8oTEh2Kzs3HDNpR0JL3hLAIOQFnwLsXNLNKboWoKdSwSBto5G7VR08KsAbdO+0tGh8dz4i82Y1u6JPkx19DpU7DqbRY0Gm2qpYj6rAA78xGUYi83BBlDsWUwu3PJfTsTY46e6hwcGLSNE370lPLH2s1e+DkMpvcac+GiDwtMkKsRdDLCmLwDDH/Na14M0h45GvFODK3R0GNjDbaj3XFnbiZEWQwoD0U5wTueCb2gF7/nYs4BkZ/P7mzS+0toZNL44fF8L1rhiFHXeaKJZFfB4/CRrZz9EpkEJ5m6YQUQBQMmGGxAWYzHic+UhB/4i5wBqxLhrlgAxkVx3IKHEwU9aXkYudS+9+0pv+zV+jsbPCoZisL39yPOPBkoHSO5vjYbXGZbcC5ToUwdtCUUE79xKzu4uO3PXp4f5xSYN9TjSdHYCOR1PY66Nm/lvk+aX8=----ATTACHMENT:----MzgyNTYyODE1NjIwNTQyNyAyODg1ODE3MzMxMjAyNDg0IDYwNjMzNTQ2MjI5NTkyNDQ=