Februar 13th, 2008
Neue Features vorgestellt bei SitePoint .
Namespaces, Namespace Aliases
use Keyword
Class Constants
Global- and Function-Namespaces
Namespace Autoload
Late static binding, variable static calls and __callstatic magic
MySQL Native Driver
Better command line parameters under windows
Februar 9th, 2008
Sebastian Bergmann hat vor kurzem in einem Blog Eintrag die Benchmark-Ergebnisse für PHP erneuert. Weiters interessant: Ich hab letztens verzweifelt nach dem Status von Namespaces in PHP gesucht und jetzt dort wieder gefunden. PHP Namespaces wirds dann mit PHP 5.3 geben.
Januar 27th, 2008
More Infos: dustindiaz.com , lixo.org , jeffreysambells.com
var myNameSpace = function NameSpace() {
// private methods/properties
var privProp = 'test string';
function privMethod1(var1) {
alert('method: privMethod1');
}
function privMethod2(var1) {
alert(privProp);
}
// public methods/properties
return {
pubMethod1 : function(var1) {
alert('method: pubMethod1');
},
pubMethod2 : function(var2) {
privMethod1();
},
pubVar1 : 'a string'
}
}();
myNameSpace.pubMethod1();
myNameSpace.pubMethod2();
alert( myNameSpace.pubVar1 );
Anonymus namespace with method export:
(function(){
function $(id) {
return document.getElementById(id);
}
function test(id) {
alert($(id).innerHTML);
}
window['mytest'] = test;
})();