Re: before beta 2

From: Date: Wed, 02 Jul 2003 00:00:10 +0000
Subject: Re: before beta 2
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-3140@lists.php.net to get a copy of this message
Hello Marcus, Monday, June 30, 2003, 2:28:35 AM, you wrote: MB> - Fix static class members. If the are public they need to be accessible from MB> outside the class. If they have an initial value this value should be used MB> and the keyword var should be working as well. MB> php -r 'class t { static public $p = "x";}; $t = new t; MB> var_dump($t->p);' MB> php -r 'class t { static var $p = "x";}; $t = new t; MB> var_dump($t->p);' MB> php -r 'class t { static public $p = "x";}; echo $t::p;' MB> To make this clear: $t->p would add a dynamic propery to instance t while we MB> want to access the static property p which can only be achieved by a MB> different notation which should be <class>'::'<static_member>. Aha, using <class>::$<member> works.... -- Best regards, Marcus mailto:helly@php.net

« previous php.internals (#3140) next »