Soft Typing PHP

Patrick Camphuijsen, Jurriaan Hage, Stefan Holdermans

Research output: Book/ReportOther report


PHP is a popular language for building websites, but also notoriously lax in that almost every value can be coerced into a value of any imaginable type. Therefore it often happens that PHP code does not behave as expected.
We have devised a flexible system that can assist a programmer
in discovering suspicious pieces of PHP code, accompanied by a
measure of suspicion.
The analysis we employ is constraint-based, uses a limited
amount of context to improve precision for non-global variables,
and applies widening to ensure termination.
We have applied the system to a number of implementations
made by programmers of various degrees of proficiency, showing
that even with these technically rather simple means it is quite
possible to obtain good results.
Original languageEnglish
PublisherDepartment of Information and Computing Sciences, Utrecht University
Number of pages13
Publication statusPublished - Feb 2009

Publication series

NameTechnical Report Series
ISSN (Print)0924-3275


Dive into the research topics of 'Soft Typing PHP'. Together they form a unique fingerprint.

Cite this