PHP

Contents
      1. Some Perl-Reg-Exps Modifiers
      2. PHP 5.3 New Features
              1. Namespaces
              2. Late Binding for static members
              3. Function Literals with Closures
              4. Other
              5. Links

Some Perl-Reg-Exps Modifiers

 preg_replace('/EXPR/MODIFIERS', replacement, subject_text);
 preg_match('/f o o # some comment
	b a r/X', 'foobar')
PCRE Pattern Modifiers

PHP 5.3 New Features

Namespaces
Declaration: "namespace foo;" Usage: "new fooSomeClass" or "use fooSomeClass as TheseClass;"
Late Binding for static members
 static::someClass::someFunction();
Function Literals with Closures
 toSet(list, function($a,$b) { return $a==$b; });
 makeAdder($a) { return function($b) use ($a) {return $a+$b;}; }
Other
Links

EditContents