Home / Section index

 PHPLint Download

PHPLint Download

The distributed package consists of a collection of PHP source programs and PHP libraries that implement PHPLint. In order to execute PHPLint, you will need the PHP CLI (Command Line Interpreter) version 5.5+ or 7.0+ as detailed in the README.txt file, so that PHPLint can run on any computer for which a PHP interpreter is available. You may also try PHPLint on-line. You may read more about the latest changes from the file CHANGES.txt.

File Size Description
phplint-3.0_20160307.zip 2082 KB The whole PHPLint project, including libraries and documentation with line-ending of the files encoded for Windows (that is, \r\n). Note how this ZIP file is larger than the TAR.GZ file below due to the way the ZIP format works when many small files are involved: in fact, file names per se are not compressed.
phplint-3.0_20160307.tar.gz 1596 KB The whole PHPLint project, including libraries and documentation with line-ending of the files encoded for Unix, Linux, Mac OS X (that is, \n). This file is smaller than the corresponding ZIP format for the reasons explained above, but the contents are exactly the same.
CVS -- Repository of the PHPLint project. From here you can download PHPLint in its current development status; the CHANGES.txt file summarizes the latest changes. Click on the link Download this directory as GNU tarball to download the whole content of the directory, or use a CVS client to access the repository as detailed below.

PHPLint is also available from the CVS repository. If you want to experiment with PHPLint in its development status and keep constantly updated, accessing the repository with a CVS program is the way to go. On Windows, you may install a CVS client program (for example from http://www.cvsnt.org) then type these commands from the terminal:

C:\> setx CVSROOT :pserver:anonymous:@cvs.icosaedro.it/home/cvs/public
C:\> cd myprograms
C:\myprograms> cvs checkout phplint
and later, to check for updates:
C:\> setx CVSROOT :pserver:anonymous:@cvs.icosaedro.it/home/cvs/public
C:\> cd c:\myprograms\phplint
C:\myprograms\phplint> cvs update -dP
On Unix/Linux:
$ export CVSROOT=:pserver:anonymous:@cvs.icosaedro.it/home/cvs/public
$ cd myprograms
$ cvs checkout phplint
and later, to check for updates:
$ export CVSROOT=:pserver:anonymous:@cvs.icosaedro.it/home/cvs/public
$ cd myprograms/phplint
$ cvs update -dP

Umberto Salsi

Site map
Home / Section index

An abstract of the last comments from the visitors of this page follows. Please, use the Comments link above to read all the messages or to send your contribute.

2013-12-04 by Anonymous
Re: OS X 10.8
Anonymous wrote: [...] (PLEASE ADD YOUR COMMENTS HERE) This link is dead, do you have another copy of the phplint configure script? thanks

2013-12-04 by Anonymous
Re: Mac OS X: gcc now deprecated
Umberto Salsi wrote: [...] (PLEASE ADD YOUR COMMENTS HERE) This isn't working for me. Did you have to install clang? I am using osx version 10.8.4 thanks

2013-11-28 by Umberto Salsi
Mac OS X: gcc now deprecated
Thanks to Harald Lapp that send me a patch to fix an error given by Mac OS X that now deprecates gcc in favor of clang. As a temporary fix, Mac OX X users may compile the "pure-C" package by temporarily change the "cc" command, something like $ alias cc=clang $ ./compile Future releases of the pure-C package will contain the fix.

2013-11-02 by Anonymous
The -lgc linker option in ./compile should be moved to the end
I have just compiled phplint on Ubuntu although it gave me some trouble. The warning about libcg.so in WARNING: gc.h or libcg.so missing or unexpected library path. confused me a bit at first, but I figured out that libgc.so was what was meant, so I went ahead and installed the necessary headers: $ sudo apt-get install libgc-devel Running ./compile to build the library still gave a bunch of linker errors: phplint.c:(.text+0x106): undefined reference to `GC_malloc' ... Eventually I figured out that I had to replace the line cc -lgc src/phplint.c -o src/phplint in ./compile with cc src/phplint.c -o src/phplint -lgc because of a change in GCC discussed here: http://stackoverflow.com/questions/12734161/how-to-use-boehm-garbage-collector-in-ubuntu-12-04

2013-05-21 by Umberto Salsi
Re: Problem on casting
Anonymous wrote: [...] Add error displaying or error logging to your configuration too see the actual error message. You may either do this from php.ini or from code. [...] PHPLint has nothing to do with Javascript and the "standard PHPLint library" does not contain a single line of Javascript. So the issue is due to something else. [...] I may suggest to start with some simpler, working example, avoiding variable-variables ($$var) that are forbidden by PHPLint, and avoiding generic mixed arrays -- always specify the type of the elements and the type of the index or let PHPLint guess the type of the array from the elements given: $my_arr1 = /*. (SomeType[int]) .*/ array(); $my_arr2 = array("x", "y"); $my_arr3["z"] = 123; Moreover, array functions array_* are usually difficult to use with [...]

2013-05-19 by Anonymous
Problem on casting
I have wamp server. Apache version: 2.2.22 php version 5.3.13 I use mysqli for queries. copied phpl.bat to my site folder (also copied stdlib - is that enough?) add on phpl.bat the line : set base=C:\phpl\ (where is the real folder of phplint). I add on code: require_once __DIR__ . "/stdlib/cast.php"; when I do cast like : cast("mysqli_result", mysql_result->query("select ...")); the code is compiled properely, but when running it, php hang (why?) I realized that any reference in my old javascript code to : settimeout (function() { ...}, 10000); - timeout not work, and I have seen of some workarround, that it maybe of synchornized ajax (I am using ajax. where it is synchronized there is no time out. That's nothing I have changed). Does php lint change some configuration to php [...]

2013-02-23 by Anonymous
Re: OS X 10.8
Anonymous wrote: [...] Hi, It's due to wrong compiler settings in the configure / compile scripts. I've already altered them so it's now compilable under Mac OSX 10.8. You need to have installed the Mac Ports package and the 'boehmgc-devel' package from it. http://www.nimasystems.com/other/prog/phplint/fixed_phplint-configure-scripts.tar

2012-11-18 by Anonymous
OS X 10.8
Do you know, how to compile phplint in 10.8 os x?

2012-07-31 by Steve H
PHPLint Fails to Interpret PHP in <script> tags
I have an app installed that uses <script language="PHP"> ... </script> to denote PHP code rather than the standard <?php ... ?> boundaries. (I've never seen this before) The PHPLint binary reports: Warning: no PHP code found at all

2012-06-24 by Umberto Salsi
Re: PHPLint: unable to compile under Ubuntu 11.10 x86_64 and PHP 5.4
Anonymous wrote: [...] It's a linking problem due to an incomplete installation of the GC library: the libgc library was not found. Probably you did not updated the libraries cache - as root user, try with the command: $ ldconfig then check if the libgc library appears in the cache: $ ldconfig -p | grep libgc and finally re-compile PHPLint.

2012-06-24 by Anonymous
Re: PHPLint: unable to compile under Ubuntu 11.10 x86_64 and PHP 5.4
Hi, I tried to go one better (Ubuntu 12.04, 64-bit) and install libgc-dev. Now the GC-related warnings are gone, but they are replaced by errors :-( Configuration file 'include/missing.c' successfully generated. Compiling... /tmp/cc4nY6oR.o: In function `M2_MALLOC': phplint.c:(.text+0x10f): undefined reference to `GC_malloc' /tmp/cc4nY6oR.o: In function `M2_MALLOC_ATOMIC': phplint.c:(.text+0x142): undefined reference to `GC_malloc_atomic' /tmp/cc4nY6oR.o: In function `M2_REALLOC': phplint.c:(.text+0x180): undefined reference to `GC_realloc' /tmp/cc4nY6oR.o: In function `m2_input': phplint.c:(.text+0x1b64): undefined reference to `GC_free' /tmp/cc4nY6oR.o: In function `main': phplint.c:(.text+0x4ceba): undefined reference to `GC_init' collect2: ld returned 1 exit status Thanks, Yaron [...]

2012-04-22 by Umberto Salsi
Re: PHPLint: unable to compile under Ubuntu 11.10 x86_64 and PHP 5.4
Anonymous wrote: [...] Hi Ilan, you should now run the ./compile script to generate the executable program under src/phplint. Actually, running the ./compile script is the only thing required to build PHPLint under Unix/Linux. The other warning messages about the missing garbage collector library GC can be safely ignored.

2012-04-21 by Anonymous
PHPLint: unable to compile under Ubuntu 11.10 x86_64 and PHP 5.4
Hi, I really wanted to try PHPLint but I am having problems compiling it. Package: phplint-pure-c-1.1_20120402.tar.gz OS: Ubuntu 11.10 PHP version: 5.4 When I execute ./configure under the untarred directory from the tar.gz file above, and I get the following: ------- Guessing system type: Your system type is: LINUX Checking compiler: ...ok Checking alloca(): ...ok Checking vasprintf(): ...ok Checking Garbage Collector (GC) library: try.c:1:19: fatal error: gc/gc.h: No such file or directory compilation terminated. WARNING: gc.h or libcg.so missing or unexpected library path. The generated programs will consume more memory than necessary, but apart that they will work fine. If you decide to install the GC later, remember to re-run this configure script. There is no need to re-run 'make', [...]