Contracts for Java (Cofoja) adds contract programming support to Java through simple yet powerful annotations: @Requires, @Ensures, @Invariant, and @ThrowEnsures. Contracts are inherited from interfaces and superclasses and can be enabled selectively during development then disabled for release.
PHPContracts is a design by contract framework for the PHP programming language. It can be used in an object-oriented manner or with simple functions. Design by contract is a style of programming where classes and methods have a "contract" specified for them. If the contract is violated, then there is a defect/bug in the program.