Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-14 Thread Derick Rethans
On 14 Jan 2003, michel 'ziobudda' morelli wrote:

> Il mar, 2003-01-07 alle 20:15, J Smith ha scritto:
> > 
> > You can still use constructors that have the same name as the class, at 
> > least for the time being. Just tested it with 4.4.0-dev HEAD and ZE2. If 
> > you have both a method with the same name as the class and a method called 
> > __construct(), the method with the class name will be used as the 
> > constructor and __construct() won't be used at all.
> 
> Only one thing: where I can found news about this new features ? 
> I read this mailinglist but I have lost the point of the new features.

http://cvs.php.net/co.php/ZendEngine2/ZEND_CHANGES?login=2&r=1.44

> Ah, when the php5 ? March ?

My best educated guess would be august 2003.

Derick

-- 

-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-14 Thread michel 'ziobudda' morelli
Il mar, 2003-01-07 alle 20:15, J Smith ha scritto:
> 
> You can still use constructors that have the same name as the class, at 
> least for the time being. Just tested it with 4.4.0-dev HEAD and ZE2. If 
> you have both a method with the same name as the class and a method called 
> __construct(), the method with the class name will be used as the 
> constructor and __construct() won't be used at all.

Only one thing: where I can found news about this new features ? 
I read this mailinglist but I have lost the point of the new features.

Tnx. 
Ah, when the php5 ? March ?

bye

--
MULTA DI 160.000 PERCHE' IL MULO E' PRIVO DI LUCI DI POSIZIONE
(Cronaca vera, 1995)

--
Michel  Morelli   [EMAIL PROTECTED]

ICQ UIN: 58351764   PR of Linux in Italy
http://www.ziobudda.net http://www.phpdev.it
-- 
--
Modi eleganti per licenziare una persona:
- Mi dica, quanto tempo ha lavorato per noi, senza contare domani?

--
Michel  Morelli   [EMAIL PROTECTED]

ICQ UIN: 58351764   PR of Linux in Italy
http://www.ziobudda.net http://www.phpdev.it


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-14 Thread michel 'ziobudda' morelli
Il mar, 2003-01-07 alle 20:15, J Smith ha scritto:
> 
> You can still use constructors that have the same name as the class, at 
> least for the time being. Just tested it with 4.4.0-dev HEAD and ZE2. If 
> you have both a method with the same name as the class and a method called 
> __construct(), the method with the class name will be used as the 
> constructor and __construct() won't be used at all.

Only one thing: where I can found news about this new features ? 
I read this mailinglist but I have lost the point of the new features.

Tnx. 
Ah, when the php5 ? March ?

bye

--
MULTA DI 160.000 PERCHE' IL MULO E' PRIVO DI LUCI DI POSIZIONE
(Cronaca vera, 1995)

--
Michel  Morelli   [EMAIL PROTECTED]

ICQ UIN: 58351764   PR of Linux in Italy
http://www.ziobudda.net http://www.phpdev.it
-- 
--
Modi eleganti per licenziare una persona:
- Mi dica, quanto tempo ha lavorato per noi, senza contare domani?

--
Michel  Morelli   [EMAIL PROTECTED]

ICQ UIN: 58351764   PR of Linux in Italy
http://www.ziobudda.net http://www.phpdev.it


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-07 Thread J Smith

You can still use constructors that have the same name as the class, at 
least for the time being. Just tested it with 4.4.0-dev HEAD and ZE2. If 
you have both a method with the same name as the class and a method called 
__construct(), the method with the class name will be used as the 
constructor and __construct() won't be used at all.

J


Brian Moon wrote:

> From what I understand, all OO code will have to be modified for PHP5.
> Constructors for example and no longer named the same as the class name.
> That alone means every class must be changed.  I don't recall anyone
> saying it would be BC either, but I could be wrong.
> 
> Brian Moon
> -
> dealnews.com
> -
> phorum.org
> 


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: Re[2]: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-07 Thread Dan Hardiker
> Please run this code and check it output!

I actually did ;) however in retyping (due to circumstances) the code I
had misread the function call as c(&$a); and on replying didt notice my
mistake.

Appologies :P If you change the function call to c(&$a); you will notice
the output being "AAC" :P


-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re[2]: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-07 Thread Andrew Sitnikov
Hello Dan,

DH> Just to prevent any misconception, the code executed through the ZE1 will
DH> actually be "AAC" rather than "AAA".
Please run this code and check it output!
It will print "AAA", because in function c() you have COPY of object `$a`, NOT 
reference (with ZE1).

Best regards,
 Andrew Sitnikov 
 e-mail : [EMAIL PROTECTED]
 GSM: (+372) 56491109


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-07 Thread Dan Hardiker
Hi,

> [FROM] Leon Atkinson
>  class a {}
>
> function c($c)
> {
> $c->name = 'C';
> }
>
> $a = new a;
> $b = $a;
>
> $a->name = "A";
> print($a->name);
> $b->name = "B";
> print($a->name);
> c($a);
> print($a->name);
> ?>
>
> In ZE1 you get "AAA". In ZE2 you get "ABC".
>

Just to prevent any misconception, the code executed through the ZE1 will
actually be "AAC" rather than "AAA". If you desired the latter result,
change "c($a);" to "c($b);".




-- 
Dan Hardiker [[EMAIL PROTECTED]]
ADAM Software & Systems Engineer
First Creative



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-07 Thread Derick Rethans
On Mon, 6 Jan 2003, George Schlossnagle wrote:

> On Monday, January 6, 2003, at 09:48  PM, Brian Moon wrote:
> 
> > From what I understand, all OO code will have to be modified for PHP5.
> > Constructors for example and no longer named the same as the class 
> > name.
> > That alone means every class must be changed.  I don't recall anyone 
> > saying
> > it would be BC either, but I could be wrong.
> 
> You're wrong.

Yeah, he is :-) ZE2 will still call the Class() function if the 
__construct() is not avaialble.

Derick

-- 

-
 Derick Rethans http://derickrethans.nl/ 
 PHP Magazine - PHP Magazine for Professionals   http://php-mag.net/
-


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-07 Thread Andrey Hristov
 To be more precise  - passed by handle.

Andrey

- Original Message - 
From: "Leon Atkinson" <[EMAIL PROTECTED]>
To: "John Wells" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, January 07, 2003 6:31 AM
Subject: Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...


> > Any good links you could throw my way describing proposed changes?
> 
> There are archives of the Zend Engine 2 list at zend.com:
> http://www.zend.com/lists.php
> 
> There is one big change with objects that will break BC.  Objects pass by
> reference instead of value, both for function calls and assignments.  For
> example:
> 
>  class a {}
> 
> function c($c)
> {
> $c->name = 'C';
> }
> 
> $a = new a;
> $b = $a;
> 
> $a->name = "A";
> print($a->name);
> $b->name = "B";
> print($a->name);
> c($a);
> print($a->name);
> ?>
> 
> In ZE1 you get "AAA". In ZE2 you get "ABC".
> 
> Leon
> 
> ---
> Leon Atkinson <http://www.leonatkinson.com/>
> 
> 
> 
> -- 
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-06 Thread Brian Moon
| > >I don't recall anyone saying
| > >it would be BC either, but I could be wrong.
| > 
| > You're wrong.
| > 
| > Of course, I could be too.
| >
| but you're not.  so its ok...
| 


So current PHP4 classes will still work in ZE2?

Brian.

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-06 Thread Leon Atkinson
> Any good links you could throw my way describing proposed changes?

There are archives of the Zend Engine 2 list at zend.com:
http://www.zend.com/lists.php

There is one big change with objects that will break BC.  Objects pass by
reference instead of value, both for function calls and assignments.  For
example:

name = 'C';
}

$a = new a;
$b = $a;

$a->name = "A";
print($a->name);
$b->name = "B";
print($a->name);
c($a);
print($a->name);
?>

In ZE1 you get "AAA". In ZE2 you get "ABC".

Leon

---
Leon Atkinson 



-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-06 Thread Sterling Hughes
> So code should be backwards compatible?  Very nice.
> 
> Any good links you could throw my way describing proposed changes?
>

never said that.  but constructors will be backwards compatible.

changes are available in the ZendEngine2 cvs repository.

-sterling

> Thanks guys.
> 
> John
> 
> Sterling Hughes said:
> >> On Monday, January 6, 2003, at 09:48  PM, Brian Moon wrote:
> >>
> >> >From what I understand, all OO code will have to be modified for
> >> PHP5. Constructors for example and no longer named the same as the
> >> class  name.
> >> >That alone means every class must be changed.  I don't recall anyone
> >> saying
> >> >it would be BC either, but I could be wrong.
> >>
> >> You're wrong.
> >>
> >> Of course, I could be too.
> >>
> > but you're not.  so its ok...
> >
> > :)
> >
> > -Sterling
> >
> >>
> >> --
> >> PHP Development Mailing List 
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-06 Thread John Wells
So code should be backwards compatible?  Very nice.

Any good links you could throw my way describing proposed changes?

Thanks guys.

John

Sterling Hughes said:
>> On Monday, January 6, 2003, at 09:48  PM, Brian Moon wrote:
>>
>> >From what I understand, all OO code will have to be modified for
>> PHP5. Constructors for example and no longer named the same as the
>> class  name.
>> >That alone means every class must be changed.  I don't recall anyone
>> saying
>> >it would be BC either, but I could be wrong.
>>
>> You're wrong.
>>
>> Of course, I could be too.
>>
> but you're not.  so its ok...
>
> :)
>
> -Sterling
>
>>
>> --
>> PHP Development Mailing List 
>> To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-06 Thread Sterling Hughes
> On Monday, January 6, 2003, at 09:48  PM, Brian Moon wrote:
> 
> >From what I understand, all OO code will have to be modified for PHP5.
> >Constructors for example and no longer named the same as the class 
> >name.
> >That alone means every class must be changed.  I don't recall anyone 
> >saying
> >it would be BC either, but I could be wrong.
> 
> You're wrong.
> 
> Of course, I could be too.
>
but you're not.  so its ok...

:)

-Sterling

> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-06 Thread George Schlossnagle
On Monday, January 6, 2003, at 09:48  PM, Brian Moon wrote:


From what I understand, all OO code will have to be modified for PHP5.
Constructors for example and no longer named the same as the class 
name.
That alone means every class must be changed.  I don't recall anyone 
saying
it would be BC either, but I could be wrong.

You're wrong.

Of course, I could be too.


--
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-06 Thread Brian Moon
>From what I understand, all OO code will have to be modified for PHP5.
Constructors for example and no longer named the same as the class name.
That alone means every class must be changed.  I don't recall anyone saying
it would be BC either, but I could be wrong.

Brian Moon
-
dealnews.com
-
phorum.org

- Original Message -
From: "John Wells" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 06, 2003 7:03 PM
Subject: [PHP-DEV] Designing for PHP4 with PHP5 in mind...


| I'm preparing for a project in which I'll be porting and redesigning a
| large, ugly Visual Basic/Sql Server app to a PHP/Mysql or Postgresql based
| web application.
|
| I'd like to code in a way that will be at the same time easily ported to
| PHP5 and that will take advantage of PHP5's new object handling
| efficiencies.  I've read varying reports of whether syntax will be
| different.
|
| Is there anything I should watch for, add, or specifically avoid while
| coding this application to make the transition as easy as possible?
|
| Thanks!
| John
|
|
|
|
|
|
|
|
| --
| PHP Development Mailing List <http://www.php.net/>
| To unsubscribe, visit: http://www.php.net/unsub.php
|
|
|


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DEV] Designing for PHP4 with PHP5 in mind...

2003-01-06 Thread John Wells
I'm preparing for a project in which I'll be porting and redesigning a
large, ugly Visual Basic/Sql Server app to a PHP/Mysql or Postgresql based
web application.

I'd like to code in a way that will be at the same time easily ported to
PHP5 and that will take advantage of PHP5's new object handling
efficiencies.  I've read varying reports of whether syntax will be
different.

Is there anything I should watch for, add, or specifically avoid while
coding this application to make the transition as easy as possible?

Thanks!
John








-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php