-
Notifications
You must be signed in to change notification settings - Fork 3
Home
nikic edited this page Sep 14, 2010
·
19 revisions
prephp allows one to use custom syntax for PHP. Especially prephp implements PHP 5.3 syntax for PHP 5.2. (Or at least, it will be implemented.)
- simulating a “normal” PHP environment for scripts precomiled by PHP. (For example, changing
__LINE__
,__FILE__
, a.s.o.) - 5.3: simulating
__DIR__
- 5.3: simulating Lambda Functions and Closures (
function($some, &$args) {}
andfunction($some, &$args) use($some, &$vars) {}
- 5.3: Referencing the class for the Scope Resolution Operator using a variable (
$classname::
) - 5.3:
const
keyword outside classes - 5.3: Ternary operator without middle part (
?:
) - 5.4: array dereferencing (
call_a_func($some, $args)[$arrIndex]
) - call function return values [not part of PHP yet] (
func($some)($args)
)
- 5.3: Namespaces
[work ongoing: basic implementation landed]
- 5.3: Late Static Binding (
static::
) - 5.3: NOWDOC (
<<<'END_TOKEN' ... END_TOKEN
) - 5.3:
__callStatic()
Magic Method - 5.3:
__invoke()
Magic Method
- 5.4: Function argument typehints for scalars
- 5.4: Traits
-
goto
(Highly complex and inefficient to implement and rarely used)