{"id":16414595,"url":"https://github.com/wapmorgan/phpcodeanalyzer","last_synced_at":"2025-04-05T16:07:16.214Z","repository":{"id":31440848,"uuid":"35004502","full_name":"wapmorgan/PhpCodeAnalyzer","owner":"wapmorgan","description":"PhpCodeAnalyzer scans codebase and analyzes which non-built-in php extensions used","archived":false,"fork":false,"pushed_at":"2023-01-17T00:23:31.000Z","size":81,"stargazers_count":97,"open_issues_count":1,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T15:05:53.204Z","etag":null,"topics":["code-analysis","php-specific","programmer-tool","static-analysis"],"latest_commit_sha":null,"homepage":"http://wapmorgan.github.io/PhpCodeAnalyzer/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wapmorgan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-03T23:26:42.000Z","updated_at":"2024-11-13T19:36:50.000Z","dependencies_parsed_at":"2023-02-10T07:01:34.667Z","dependency_job_id":null,"html_url":"https://github.com/wapmorgan/PhpCodeAnalyzer","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wapmorgan%2FPhpCodeAnalyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wapmorgan%2FPhpCodeAnalyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wapmorgan%2FPhpCodeAnalyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wapmorgan%2FPhpCodeAnalyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wapmorgan","download_url":"https://codeload.github.com/wapmorgan/PhpCodeAnalyzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361687,"owners_count":20926643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-analysis","php-specific","programmer-tool","static-analysis"],"created_at":"2024-10-11T06:54:31.371Z","updated_at":"2025-04-05T16:07:16.196Z","avatar_url":"https://github.com/wapmorgan.png","language":"PHP","readme":"# PhpCodeAnalyzer\nPhpCodeAnalyzer finds usage of different non-built-in extensions in your php code.\nThis tool helps you understand how transportable your code between php installations is.\n\n[![Latest Stable Version](https://poser.pugx.org/wapmorgan/php-code-analyzer/v/stable)](https://packagist.org/packages/wapmorgan/php-code-analyzer)\n[![Total Downloads](https://poser.pugx.org/wapmorgan/php-code-analyzer/downloads)](https://packagist.org/packages/wapmorgan/php-code-analyzer)\n[![License](https://poser.pugx.org/wapmorgan/php-code-analyzer/license)](https://packagist.org/packages/wapmorgan/php-code-analyzer)\n\n# TOC\n- [Example of usage](#example-of-usage)\n- [Help](#help)\n- [Installation](#installation)\n\n# Example of usage\nTo scan your files or folder launch `phpca` and pass file or directory names.\n``` sh\n\u003e phpca ..\\HttpServer\nScanning ..\\HttpServer ...\n[spl] Function \"spl_autoload_register\" used in file ..\\HttpServer/vendor/composer/ClassLoader.php[258]\n[spl] Function \"spl_autoload_unregister\" used in file ..\\HttpServer/vendor/composer/ClassLoader.php[266]\n[spl] Function \"spl_autoload_register\" used in file ..\\HttpServer/vendor/composer/autoload_real.php[22]\n[spl] Function \"spl_autoload_unregister\" used in file ..\\HttpServer/vendor/composer/autoload_real.php[24]\n\nUsed non-built-in extensions in your code:\n- [spl] Standard PHP Library (SPL). This extension is bundled with php since PHP 5.0.0. Extension is available in pecl: spl.\n```\n\nYou can skip progress with `--no-progress` option:\n``` sh\n\u003e phpca --no-progress ..\\yii-1.1.16.bca042\\framework\\caching\nScanning ..\\yii-1.1.16.bca042\\framework\\caching ...\n\nUsed non-built-in extensions in your code:\n- [apc] Alternative PHP Cache. Extension is available in pecl: apc.\n- [wincache] Windows Cache for PHP. Extension is available in pecl: wincache.\n\n```\n\nAlso, you can keep only progress with `--no-report` option:\n``` sh\n\u003e phpca --no-report ..\\yii-1.1.16.bca042\\framework\\caching\nScanning ..\\yii-1.1.16.bca042\\framework\\caching ...\n[apc] Function \"apc_fetch\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[46]\n[apc] Function \"apc_fetch\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[56]\n[apc] Function \"apc_store\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[70]\n[apc] Function \"apc_add\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[84]\n[apc] Function \"apc_delete\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[95]\n[apc] Function \"apc_clear_cache\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[107]\n[apc] Function \"apc_clear_cache\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[109]\n[wincache] Function \"wincache_ucache_get\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CWinCache.php[46]\n[wincache] Function \"wincache_ucache_get\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CWinCache.php[56]\n[wincache] Function \"wincache_ucache_set\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CWinCache.php[70]\n[wincache] Function \"wincache_ucache_add\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CWinCache.php[84]\n[wincache] Function \"wincache_ucache_delete\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CWinCache.php[95]\n[wincache] Function \"wincache_ucache_clear\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CWinCache.php[106]\n```\n\nIf you want to see only usage of one specific extension, use `--extension=` option:\n``` sh\n\u003e phpca --extension=apc ..\\yii-1.1.16.bca042\\framework\\caching\nScanning ..\\yii-1.1.16.bca042\\framework\\caching ...\n[apc] Function \"apc_fetch\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[46]\n[apc] Function \"apc_fetch\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[56]\n[apc] Function \"apc_store\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[70]\n[apc] Function \"apc_add\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[84]\n[apc] Function \"apc_delete\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[95]\n[apc] Function \"apc_clear_cache\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[107]\n[apc] Function \"apc_clear_cache\" used in file ..\\yii-1.1.16.bca042\\framework\\caching/CApcCache.php[109]\n```\nSummary report in this case will not be added at the end.\n\n# Help\nFull list of available options:\n```sh\n\u003e phpca -h\nPhpCodeAnalyzer\nUsage:\n    phpca [-v] [-q] [--output=\u003cpath\u003e] [--no-report] [--no-progress] [--since-version=\u003cversion\u003e] FILES...\n    phpca [-v] [-q] [--output=\u003cpath\u003e] --extension=\u003cext\u003e FILES...\n    phpca -h\n\nOptions:\n  -h --help                 Show this text\n  -v --verbose              Show more debug text\n  -q --quiet                Don't print any messages\n  --output=\u003cpath\u003e           Path where to generate XML report\n  --extension=\u003cext\u003e         Look for usage a specific extension\n  --no-report               Turn off summary report\n  --no-progress             Turn off progress\n  --since-version=\u003cversion\u003e Only include extensions not included since version\n```\n\n# Installation\n## Phar\n\n1. Just download a phar from [releases page](https://github.com/wapmorgan/PhpCodeAnalyzer/releases) and make executable\n  ```sh\n  chmod +x phpca.phar\n  ```\n  \n2. a. **Local installation**: use it from current folder:\n    ```php\n    ./phpca.phar -h\n    ```\n    \n    b. **Global installation**: move it in to one of folders listed in your `$PATH` and run from any folder:\n    ```sh\n    sudo mv phpca.phar /usr/local/bin/phpca\n    phpca -h\n    ```\n\n## Composer\nAnother way to install **phpca** is via composer.\n\n1. Install composer:\n  ```sh\n  curl -sS https://getcomposer.org/installer | php\n  ```\n\n2. Install phpcf in global composer dir:\n  ```sh\n  ./composer.phar global require wapmorgan/php-code-analyzer dev-master\n  ```\n  \n3. Run from any folder:\n  ```sh\n  phpca -h\n  ```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwapmorgan%2Fphpcodeanalyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwapmorgan%2Fphpcodeanalyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwapmorgan%2Fphpcodeanalyzer/lists"}