algoritma/phpinfo 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

algoritma/phpinfo

Composer 安装命令:

composer require algoritma/phpinfo

包简介

A lightweight CLI tool to fetch and inspect PHP settings by running `phpinfo()` via HTTP in your web application's environment. This tool is particularly useful for verifying the actual configuration of a running FPM instance when CLI settings might differ.

README 文档

README

A lightweight CLI tool to fetch and inspect PHP settings by running phpinfo() via HTTP in your web application's environment. This tool is particularly useful for verifying the actual configuration of a running FPM instance when CLI settings might differ.

Features

  • Accurate Info: Fetches settings from the perspective of the web server, not the CLI.
  • Secure: Uses a randomly named temporary file that is automatically deleted after each request.
  • Filtering: View only important settings, search for specific keys, or filter by extension/section.
  • Colorized Output: Easy-to-read terminal output with a legend for local vs. default values.

Requirements

  • PHP 8.4 or higher.
  • PHP cURL extension.
  • Write access to the public directory of your web application.

Installation

Via Composer

You can install this tool as a dependency in your project:

composer require algoritma/phpinfo

Or install it globally:

composer global require algoritma/phpinfo

Utilization

The tool provides a single command: php:info.

Basic Usage

You must provide the base URL of your application. The tool will automatically attempt to guess your project's public directory.

bin/phpinfo https://myapp.local

Configuration via Environment Variables

You can set default values in a .env file in your current directory:

APP_URL=https://myapp.local
APP_PUBLIC_DIR=/var/www/html/public

Advanced Options

  • Specific Public Directory: If the tool cannot guess it correctly.

    bin/phpinfo https://myapp.local /var/www/html/my-public-dir
  • Filter by Section: Show only specific extensions or sections.

    bin/phpinfo https://myapp.local --section=core --section=opcache
  • Search for a Key: Find a specific configuration directive.

    bin/phpinfo https://myapp.local --search=memory
  • Show Important Settings: Display a curated list of the most relevant production settings.

    bin/phpinfo https://myapp.local --important
  • Skip SSL Verification: Useful for local development with self-signed certificates.

    bin/phpinfo https://myapp.local --no-verify

Contributing

Contributions are welcome! To contribute, follow these steps:

  1. Fork the repository.

  2. Install dependencies:

    composer install
  3. Run Quality Assurance: Before submitting a PR, ensure all tests and quality checks pass:

    make qa

    This command runs:

    • PHPUnit: Unit and integration tests.
    • PHPStan: Static analysis.
    • Rector: Code upgrades and refactoring checks.
    • PHP-CS-Fixer: Coding style checks.
  4. Fix Coding Style / Rector: If there are issues, you can run:

    make qa-fix

Project Structure

  • bin/: The CLI entry point.
  • src/Command/: Symfony Console command implementation.
  • src/Service/: Logic for fetching, parsing, filtering, and rendering PHP info.
  • tests/: PHPUnit tests.

License

This project is licensed under the MIT License. See the LICENSE file (if present) or composer.json for details.

algoritma/phpinfo 适用场景与选型建议

algoritma/phpinfo 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 37 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 03 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 algoritma/phpinfo 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 algoritma/phpinfo 我们能提供哪些服务?
定制开发 / 二次开发

基于 algoritma/phpinfo 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 37
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 27
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-06