Fork me on GitHub
Objective-PHP is a port of the Objective-C (or Objective-J runtime to PHP. This adds the language features of Objective-C nestled nicely inside the syntax of Objective-C. Moka is a port of the Apple Cocoa Frameworks (or Cappuccino).

Objective-PHP Keywords

The Objective-PHP keywords start with an @ symbol. Note that this includes the Objective-C keyword #import which is @import in ObjPHP as `#’ denotes a comment in PHP.

You may notice some keywords are added to be compatible with Objective-J syntax.

The following is a list of Objective-PHP keywords (effectively this extends the PHP keyword set by this list, ie you cannot use these names in your code) including whether they are currently supported in the language:

The following is a list of Special variables`:

Implementation Details

The more awake (or caffine fueled) of you will note that @ too has a special meaning in PHP. It is the Silence operator and mutes the output of a function call (e.g. @test(); wil output nothing). This is only a problem if one wants to name a PHP method the same as one of the Objective-PHP keywords. However this is illegal anyway (you cannot name methods after keywords) so there should be not other constraints).


Document status: COMPLETE for current version.