Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (137) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2023-01-18 (2 days ago) | 73% | Total: 304 This week: 4 | All time: 7,347 This week: 42 |
Version | License | PHP version | Categories | |||
phpca 1.13 | BSD License | 5.3 | PHP 5, Utilities and Tools, Language |
Description | Author | |||
This class can analyze PHP code to check if it uses non-builtin extensions. Innovation Award
|
PhpCodeAnalyzer finds usage of different non-built-in extensions in your php code. This tool helps you understand how transportable your code between php installations is.
To scan your files or folder launch phpca
and pass file or directory names.
> phpca ..\HttpServer
Scanning ..\HttpServer ...
[spl] Function "spl_autoload_register" used in file ..\HttpServer/vendor/composer/ClassLoader.php[258]
[spl] Function "spl_autoload_unregister" used in file ..\HttpServer/vendor/composer/ClassLoader.php[266]
[spl] Function "spl_autoload_register" used in file ..\HttpServer/vendor/composer/autoload_real.php[22]
[spl] Function "spl_autoload_unregister" used in file ..\HttpServer/vendor/composer/autoload_real.php[24]
Used non-built-in extensions in your code:
- [spl] Standard PHP Library (SPL). This extension is bundled with php since PHP 5.0.0. Extension is available in pecl: spl.
You can skip progress with --no-progress
option:
> phpca --no-progress ..\yii-1.1.16.bca042\framework\caching
Scanning ..\yii-1.1.16.bca042\framework\caching ...
Used non-built-in extensions in your code:
- [apc] Alternative PHP Cache. Extension is available in pecl: apc.
- [wincache] Windows Cache for PHP. Extension is available in pecl: wincache.
Also, you can keep only progress with --no-report
option:
> phpca --no-report ..\yii-1.1.16.bca042\framework\caching
Scanning ..\yii-1.1.16.bca042\framework\caching ...
[apc] Function "apc_fetch" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[46]
[apc] Function "apc_fetch" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[56]
[apc] Function "apc_store" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[70]
[apc] Function "apc_add" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[84]
[apc] Function "apc_delete" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[95]
[apc] Function "apc_clear_cache" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[107]
[apc] Function "apc_clear_cache" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[109]
[wincache] Function "wincache_ucache_get" used in file ..\yii-1.1.16.bca042\framework\caching/CWinCache.php[46]
[wincache] Function "wincache_ucache_get" used in file ..\yii-1.1.16.bca042\framework\caching/CWinCache.php[56]
[wincache] Function "wincache_ucache_set" used in file ..\yii-1.1.16.bca042\framework\caching/CWinCache.php[70]
[wincache] Function "wincache_ucache_add" used in file ..\yii-1.1.16.bca042\framework\caching/CWinCache.php[84]
[wincache] Function "wincache_ucache_delete" used in file ..\yii-1.1.16.bca042\framework\caching/CWinCache.php[95]
[wincache] Function "wincache_ucache_clear" used in file ..\yii-1.1.16.bca042\framework\caching/CWinCache.php[106]
If you want to see only usage of one specific extension, use --extension=
option:
> phpca --extension=apc ..\yii-1.1.16.bca042\framework\caching
Scanning ..\yii-1.1.16.bca042\framework\caching ...
[apc] Function "apc_fetch" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[46]
[apc] Function "apc_fetch" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[56]
[apc] Function "apc_store" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[70]
[apc] Function "apc_add" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[84]
[apc] Function "apc_delete" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[95]
[apc] Function "apc_clear_cache" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[107]
[apc] Function "apc_clear_cache" used in file ..\yii-1.1.16.bca042\framework\caching/CApcCache.php[109]
Summary report in this case will not be added at the end.
Full list of available options:
> phpca -h
PhpCodeAnalyzer
Usage:
phpca [-v] [-q] [--output=<path>] [--no-report] [--no-progress] [--since-version=<version>] FILES...
phpca [-v] [-q] [--output=<path>] --extension=<ext> FILES...
phpca -h
Options:
-h --help Show this text
-v --verbose Show more debug text
-q --quiet Don't print any messages
--output=<path> Path where to generate XML report
--extension=<ext> Look for usage a specific extension
--no-report Turn off summary report
--no-progress Turn off progress
--since-version=<version> Only include extensions not included since version
Just download a phar from releases page and make executable
chmod +x phpca.phar
a. Local installation: use it from current folder:
./phpca.phar -h
b. Global installation: move it in to one of folders listed in your `$PATH` and run from any folder:
sudo mv phpca.phar /usr/local/bin/phpca
phpca -h
Another way to install phpca is via composer.
Install composer:
curl -sS https://getcomposer.org/installer | php
Install phpcf in global composer dir:
./composer.phar global require wapmorgan/php-code-analyzer dev-master
Run from any folder:
phpca -h
Files |
File | Role | Description | ||
---|---|---|---|---|
bin (1 file) | ||||
data (131 files) | ||||
src (1 file) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE.md | Lic. | Auxiliary data | ||
README.md | Doc. | Auxiliary data | ||
_config.yml | Data | Auxiliary data |
Files | / | data |
File | Role | Description |
---|---|---|
apc.php | Aux. | Auxiliary script |
apd.php | Aux. | Auxiliary script |
bbcode.php | Aux. | Auxiliary script |
bcompiler.php | Aux. | Auxiliary script |
blenc.php | Aux. | Auxiliary script |
cairo.php | Aux. | Auxiliary script |
chdb.php | Aux. | Auxiliary script |
classkit.php | Aux. | Auxiliary script |
com.php | Aux. | Auxiliary script |
crack.php | Aux. | Auxiliary script |
cubrid.php | Aux. | Auxiliary script |
curl.php | Aux. | Auxiliary script |
dba.php | Aux. | Auxiliary script |
dbplus.php | Aux. | Auxiliary script |
dbx.php | Aux. | Auxiliary script |
dio.php | Aux. | Auxiliary script |
eio.php | Aux. | Auxiliary script |
enchant.php | Aux. | Auxiliary script |
ev.php | Aux. | Auxiliary script |
event.php | Aux. | Auxiliary script |
expect.php | Aux. | Auxiliary script |
fam.php | Aux. | Auxiliary script |
fann.php | Aux. | Auxiliary script |
fdf.php | Aux. | Auxiliary script |
fileinfo.php | Aux. | Auxiliary script |
filter.php | Aux. | Auxiliary script |
fribidi.php | Aux. | Auxiliary script |
gearman.php | Aux. | Auxiliary script |
gender.php | Aux. | Auxiliary script |
geoip.php | Aux. | Auxiliary script |
gmagick.php | Aux. | Auxiliary script |
gnupg.php | Aux. | Auxiliary script |
gupnp.php | Aux. | Auxiliary script |
haru.php | Aux. | Auxiliary script |
hash.php | Aux. | Auxiliary script |
hrtime.php | Aux. | Auxiliary script |
http.php | Aux. | Auxiliary script |
hwapi.php | Aux. | Auxiliary script |
ibm-db2.php | Aux. | Auxiliary script |
id3.php | Aux. | Auxiliary script |
iisfunc.php | Aux. | Auxiliary script |
imagick.php | Aux. | Auxiliary script |
inclued.php | Aux. | Auxiliary script |
ingres.php | Aux. | Auxiliary script |
inotify.php | Aux. | Auxiliary script |
intl.php | Aux. | Auxiliary script |
json.php | Aux. | Auxiliary script |
judy.php | Aux. | Auxiliary script |
kadm5.php | Aux. | Auxiliary script |
ktaglib.php | Aux. | Auxiliary script |
lapack.php | Aux. | Auxiliary script |
libevent.php | Aux. | Auxiliary script |
lua.php | Aux. | Auxiliary script |
lzf.php | Aux. | Auxiliary script |
mailparse.php | Aux. | Auxiliary script |
mcve.php | Aux. | Auxiliary script |
memcache.php | Aux. | Auxiliary script |
memcached.php | Aux. | Auxiliary script |
mhash.php | Aux. | Auxiliary script |
ming.php | Aux. | Auxiliary script |
mnogosearch.php | Aux. | Auxiliary script |
mongo.php | Aux. | Auxiliary script |
mqseries.php | Aux. | Auxiliary script |
msession.php | Aux. | Auxiliary script |
ncurses.php | Aux. | Auxiliary script |
net-gopher.php | Aux. | Auxiliary script |
newt.php | Aux. | Auxiliary script |
nis.php | Aux. | Auxiliary script |
oauth.php | Aux. | Auxiliary script |
odbc.php | Aux. | Auxiliary script |
oggvorbis.php | Aux. | Auxiliary script |
opcache.php | Aux. | Auxiliary script |
openal.php | Aux. | Auxiliary script |
paradox.php | Aux. | Auxiliary script |
parsekit.php | Aux. | Auxiliary script |
pdf.php | Aux. | Auxiliary script |
pdo.php | Aux. | Auxiliary script |
proctitle.php | Aux. | Auxiliary script |
ps.php | Aux. | Auxiliary script |
pthreads.php | Aux. | Auxiliary script |
quickhash.php | Aux. | Auxiliary script |
radius.php | Aux. | Auxiliary script |
rar.php | Aux. | Auxiliary script |
readline.php | Aux. | Auxiliary script |
rpmreader.php | Aux. | Auxiliary script |
rrd.php | Aux. | Auxiliary script |
runkit.php | Aux. | Auxiliary script |
sam.php | Aux. | Auxiliary script |
sca.php | Aux. | Auxiliary script |
sdo.php | Aux. | Auxiliary script |
session-pgsql.php | Aux. | Auxiliary script |
snmp.php | Aux. | Auxiliary script |
soap.php | Aux. | Auxiliary script |
solr.php | Aux. | Auxiliary script |
sphinx.php | Aux. | Auxiliary script |
spl-types.php | Aux. | Auxiliary script |
spl.php | Aux. | Auxiliary script |
spplus.php | Aux. | Auxiliary script |
sqlsrv.php | Aux. | Auxiliary script |
ssdeep.php | Aux. | Auxiliary script |
ssh2.php | Aux. | Auxiliary script |
stats.php | Aux. | Auxiliary script |
stomp.php | Aux. | Auxiliary script |
svm.php | Aux. | Auxiliary script |
svn.php | Aux. | Auxiliary script |
swish.php | Aux. | Auxiliary script |
sync.php | Aux. | Auxiliary script |
taint.php | Aux. | Auxiliary script |
tcpwrap.php | Aux. | Auxiliary script |
tokyo-tyrant.php | Aux. | Auxiliary script |
trader.php | Aux. | Auxiliary script |
uopz.php | Aux. | Auxiliary script |
v8js.php | Aux. | Auxiliary script |
varnish.php | Aux. | Auxiliary script |
vpopmail.php | Aux. | Auxiliary script |
weakref.php | Aux. | Auxiliary script |
win32ps.php | Aux. | Auxiliary script |
win32service.php | Aux. | Auxiliary script |
wincache.php | Aux. | Auxiliary script |
xattr.php | Aux. | Auxiliary script |
xdiff.php | Aux. | Auxiliary script |
xhprof.php | Aux. | Auxiliary script |
xmldiff.php | Aux. | Auxiliary script |
xmlreader.php | Aux. | Auxiliary script |
xmlwriter.php | Aux. | Auxiliary script |
yaf.php | Aux. | Auxiliary script |
yaml.php | Aux. | Auxiliary script |
yar.php | Aux. | Auxiliary script |
yaz.php | Aux. | Auxiliary script |
zip.php | Aux. | Auxiliary script |
zmq.php | Aux. | Auxiliary script |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
User Ratings | ||||||||||||||||||||||||||||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.