I would recommend that class names need not be treated as strings:
doSomethingWithAClass(ClassName)
instead of
doSomethingWithAClass("ClassName")
As it is, this produces warnings with the right logging.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.ne
What was the result of this discussion?
Thanks
On 27 Oct 2004, at 12:50, Andi Gutmans wrote:
At 10:53 AM 10/27/2004 +0200, Christian Schneider wrote:
Marcus Boerger wrote:
So for now the only addition we may probably consider for 5.1 is
adding 4: optional typehinted values that default to null and
So why must we all keep implementing it?
On 23 Jan 2004, at 4:21 PM, Timm Friebe wrote:
This can be done in userland and should take a more or less skilled
programmer 5 to 10 minutes.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
I was told earlier that this is the correct way to do it:
public function __clone()
{
$this = parent::__clone();
$this->... = $that->...;
...
}
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
(Sorry for the subject, I couldn't resist).
It seems that the parent class's variables are not being copied per bit
by the default implementation, so how should a superclasses __clone()
method be dealt with? In other words, should it be like this:
public function __clone()
{
$this = par
I did not have some things installed. I apologize for the time wasted.
Thanks.
On 31 Dec 2003, at 12:39 PM, [EMAIL PROTECTED] wrote:
Thanks for the reply. Yes, I am quite sure it doesn't work. Moreover,
it doesn't work when trying to configure b2 either, so something is
fishy in the land of PH
Thanks for the reply. Yes, I am quite sure it doesn't work. Moreover,
it doesn't work when trying to configure b2 either, so something is
fishy in the land of PHP.
and then again with one that worked for b2:
'./configure' '--prefix=/usr/local/php/betas/php-5.0.0b2'
'--with-apxs' '--with-dom=/sw
I have Mac OS X 10.3.2
On 30 Dec 2003, at 11:59 PM, [EMAIL PROTECTED] wrote:
I've tried to configure PHP 5 b3 with the following command:
./configure --prefix=/usr/local/php/betas/php-5.0.0b3 --with-mysql=/sw
--with-gd=/sw --with-libxml-dir=/sw/lib --with-zlib-dir=/sw
--with-bz2=/sw --with-gmp
I've tried to configure PHP 5 b3 with the following command:
./configure --prefix=/usr/local/php/betas/php-5.0.0b3 --with-mysql=/sw
--with-gd=/sw --with-libxml-dir=/sw/lib --with-zlib-dir=/sw
--with-bz2=/sw --with-gmp=/sw --with-pspell=/sw --enable-sockets
--with-apxs
and then again with one t
Alright.
On 6 Nov 2003, at 2:58 AM, Andi Gutmans wrote:
At 08:01 PM 11/5/2003 -0500, [EMAIL PROTECTED] wrote:
I noticed that echo $object statements in PHP 5 display object ids
that are kept by the engine, so this data is already in the string
form and it is data that exists. As for as a use fo
I noticed that echo $object statements in PHP 5 display object ids that
are kept by the engine, so this data is already in the string form and
it is data that exists. As for as a use for this feature, one can't
easily say there is not a use; there have been times when I wished to
have this feat
I don't want to seem naggish, but what do you think?
On 3 Nov 2003, at 8:26 AM, [EMAIL PROTECTED] wrote:
Now that objects are accounted for by references and id, it should be
possible to use them as keys in an associative array. That might be an
interesting feature to have.
--
PHP Internals -
Now that objects are accounted for by references and id, it should be
possible to use them as keys in an associative array. That might be an
interesting feature to have.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
It seems that PHP 5 treats all methods as lower case, so that text() is
Text(). Is this going to remain this way?
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
I deduced this myself, so I sent an email to the pear-dev list and we
seem to have come to a conclusion. Thanks
On Monday, Oct 27, 2003, at 00:51 America/New_York, Andi Gutmans wrote:
The overload extension is obsolete in PHP 5. How the PEAR guys are
planning on fixing their code I'm not sure.
I fixed the problem by editing the Autoloader.php. Is there a better
way to do this? Should I just rewrite the code for my classes and get
rid of PEAR? What is the best solution? I realize that this is probably
not a question germane to this list, so thank you for any help.
On Sunday, Oct 26, 2
I just found that there is no code for the overload extension. I assume
that it is more formally included in this version. Should I rewrite my
classes that make use of the overload function?
On Sunday, Oct 26, 2003, at 11:45 America/New_York, George Schlossnagle
wrote:
On Sunday, October 26, 2
I finally got it to build with this:
./configure --with-apxs --with-dom=/sw --with-libxml-dir=/sw
--with-xsl=/sw --with-zlib-dir=/sw --with-mysql=/sw --with-xsl=/sw
I need the overload extension, so I tried passing
--enable-overload and --with-overload
but it does not seem to do anything.
How
I have install libxml2 using fink for Mac OS X, so that the libraries
are stored in /sw/lib, and the includes are in
/sw/include/libxml2/libxml. I have tried these directories including
the latter directory without the last directory, but to no avail. So, I
don't know what the deal is. Thanks f
When configuring PHP 5 for Mac OS X, I get this every time, even with
2.5.10 installed:
not found
configure: error: Please reinstall the libxml >= 2.4.14 distribution
What is the deal?
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
This may be where the problem:
zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args);
Would this do the trick?
zend_get_parameters_array(ZEND_NUM_ARGS(), args);
On Wednesday, Oct 22, 2003, at 20:47 America/New_York, Alan Knowles
wrote:
There is already a bug report on it, however It sounds like
This may be where the problem:
zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args);
Would this do the trick?
zend_get_parameters_array(ZEND_NUM_ARGS(), args);
On Wednesday, Oct 22, 2003, at 20:47 America/New_York, Alan Knowles
wrote:
There is already a bug report on it, however It sounds like
The methods of an object that has been passed to the overload()
function lose their ability to have parameters passed by reference. For
example:
class Foo
{
function hello(&$array)
{
$array[] = "hello";
}
}
$array = null;
$foo = & new foo();
$foo->hello($array);
print_r($arra
(Note: this email seems to relate to this list in my opinion, but I
have been chewed out before when posting such emails)
I am using PHP 4.3.2, and it seems that testing objects for equality
(with == or ===) causes an internal bug when the objects have recursive
instance variables. That is, i
On Sunday, Aug 31, 2003, at 06:16 America/New_York, Ard Biesheuvel
wrote:
Perhaps this is an example from C++, but it illustrates my point.
This may be a better example, if we are to step back a decade or two:
int i;
for (i = 0; i < 5; i++)
What is so 'inherently declaratory' about this for() ?
Thank you for the first decent response. I concede.
On Sunday, Aug 31, 2003, at 07:09 America/New_York, Zeev Suraski wrote:
As illustrated, we're not considering a change because what you're
suggesting contradicts fundamental building blocks of PHP: no need to
declare variables, and the fact t
On Sunday, Aug 31, 2003, at 07:36 America/New_York, Jeremy Johnstone
wrote:
It ain't gonna happen, so why continue to make an ass of yourself?
When you get three of the top people in PHP's development telling you
it
will NEVER happen, then you should really pay attention! No amount of
explainin
I am saying that perhaps the for loop should treat that part as a
declaratory statement and mask outer variables.
On Saturday, Aug 30, 2003, at 15:28 America/New_York, Rasmus Lerdorf
wrote:
Yes, but you are adding a declaration separate from the for loop there.
So not the same at all given ther
I was sincere. I meant "modern" to mean more recent. Though, I do agree
with the correlation between your interpretation and response. I
apologize.
On Saturday, Aug 30, 2003, at 21:44 America/New_York, George
Schlossnagle wrote:
On Saturday, August 30, 2003, at 09:12 PM, [EMAIL PROTECTED]
wr
I was sincere. I meant "modern" to mean more recent. Though, I do agree
with the correlation between your interpretation and response. I
apologize.
On Saturday, Aug 30, 2003, at 21:44 America/New_York, George
Schlossnagle wrote:
On Saturday, August 30, 2003, at 09:12 PM, [EMAIL PROTECTED]
wr
I was sincere. I meant "modern" to mean more recent. Though, I do agree
with the correlation between your interpretation and response. I
apologize.
On Saturday, Aug 30, 2003, at 21:44 America/New_York, George
Schlossnagle wrote:
On Saturday, August 30, 2003, at 09:12 PM, [EMAIL PROTECTED]
wr
I thank you for your open-mindedness, but I must admit I was in the
fault. I supplied a version from a modern language such as C++.
On Saturday, Aug 30, 2003, at 20:36 America/New_York, DvDmanDT wrote:
As I've understood it your example is like only valid in the latest C++
standards or something
NOTE: I am reentering the fray on provocation.
On Saturday, Aug 30, 2003, at 19:59 America/New_York, Ard Biesheuvel
wrote:
for (int i = 0; i < 5; i++)
{
int num = array[i];
printf("%d", num);
for (int i = 0; i < 5; i++)
printf("%d", i * num);
}
Perhaps thi
Actually, with a careful implementation, backwards compatibility can be
achieved. A separate symbol table, indeed I agree, would be
undesirable. Instead, the interpreter could simply mask the other
variables of the same name during the loop, and return things to normal
afterward.
P.S.
Consider
Not so. I supplied this version earlier:
int array[] = {1, 2, 3, 4, 5};
for (int i = 0; i < 5; i++)
{
int num = array[i];
printf("%d", num);
for (int i = 0; i < 5; i++)
printf("%d", i * num);
}
On Saturday, Aug 30, 2003, at 15:19 America/New_York, Rasmus Le
It is you who attributes such an elevating status to this discourse. I
had not intention of pretentiousness. You have, in fact, condemned
yourself:
>>PHP is designed for dummies.
On Saturday, Aug 30, 2003, at 14:55 America/New_York, Wez Furlong wrote:
OK, so how long before we get to prove God
I'm talking about the traditional for construct on which the PHP
version is based. In PHP, that part of the for construct is somewhat
meaningless. I'm saying that it is not as programmatically powerful as
it could be. I understand how it currently works (what you have been
stating), and I am sa
On Saturday, Aug 30, 2003, at 14:31 America/New_York, Marcus Börger
wrote:
Hello LingWitt,
Hi.
- PHP is typeless
Thanks, but that's established.
- for doesn't span any declaration level and hence does not have its
own
symbol table
This is ridiculous.
- PHP is not c, not C++ not
That part of the for loop is inherently declaratory. As a result, the
interpreter should add any variables in that portion to the new symbol
table of that for loop. Any most other languages, that portion of the
for loop creates variables specifically in the scope of the for loop.
Other variable
This is not a how-to question. This is a statement. There was not
question mark in any of my emails. This is criticism, and
criticms=>improvement=>development.
On Saturday, Aug 30, 2003, at 10:54 America/New_York, Wez Furlong wrote:
PHP is not C++.
Please go and carefully read the whole
On Saturday, Aug 30, 2003, at 10:33 America/New_York, Derick Rethans
wrote:
On Sat, 30 Aug 2003 [EMAIL PROTECTED] wrote:
Since the inner loop declares $i again, it should mask the outer
loop's
$i as per other languages. Besides being useful, it makes more sense.
No, that's not true. You don't
Firstly, thanks for the tip.
Secondly, since you fixed the problems I enumerated in another version,
it would seem that my posting is relevant to development.
Thanks,
[EMAIL PROTECTED]
On Saturday, Aug 30, 2003, at 10:22 America/New_York, Derick Rethans
wrote:
Try PHP 5, and stop mailing those
Since the inner loop declares $i again, it should mask the outer loop's
$i as per other languages. Besides being useful, it makes more sense.
Otherwise, the declaratory statement in the second loop is completely
meaningless.
On Saturday, Aug 30, 2003, at 10:21 America/New_York, Derick Rethans
Variable scope is mediocre at best. For instances:
$array = array(1, 2, 3, 4, 5);
for ($i = 0; $i < 5; $i++)
{
$num = $array[$i];
echo $num;
for ($i = 0; $i < 5; $i++)
{
echo $num * $i;
}
}
The inner loop $i doesn't mask the outer loop $i.
T
The current support for references is mediocre at best. For instance:
class foobar
{
var $variable;
function foobar()
{
$variable = "foobar";
}
}
//This form of new assignment should be the default
$a = & new foobar();
$b = & new foobar();
$
45 matches
Mail list logo