Der Martin: Dynamic class

Beitrag lesen

Hi,

However, then the single occurrence at \App and \Mod is wrong, strictly speaking,
Nope, as PHP defines only a meaning for both \ and ' in single quoted strings.

there it says: To specify a literal backslash, double it (\).

Any other combination will be treated literally.

True, I read that too. But to me, it appears like just a matter of "guaranteed fault tolerance" to accept a single backslash, even though there's a rule that says it should be doubled. It's clearly one of those wobbly rules that PHP is so rich of.

Anyway, it means that alkativo's code is syntactically correct, I admit.
But nevertheless I'd use double backslashes even when a single one would do. It seems cleaner to me. ;-)

Ciao,
 Martin

--
Fettflecke werden wieder wie neu, wenn man sie regelmäßig mit etwas Butter einschmiert.
Selfcode: fo:) ch:{ rl:| br:< n4:( ie:| mo:| va:) de:] zu:) fl:{ ss:) ls:µ js:(