Re: Binarycloud php5 issues.

"B. Kamer" <[email protected]> Fri, 28 Oct 2005 15:52:39 +0200
Newsgroups gmane.comp.lib.binarycloud.devel
Message-ID <[email protected]>
On Oct 28, 2005, at 12:36 PM, Jean-Christophe Michel wrote:

> Hi Bas,
>
> Bas Kamer wrote:
>
>> does anyone see any obvious problem with this approach in the bc  
>> node tree?
>>
>> it does seem to work... and a check for the objects reveals they
>> reference the same object...
>>
>> testsite does run, although a lot of E_STRICT message appear in the
>> logs. this seems to affect the unittest to... (if message tests  
>> failes)
>>
>

you are correct, that's why i commited with a phpversion() check...
if >= php5 use =
else use =&

i checked that both instances reference the same object with  
compare_references() from bc/init/functions.php (which has been  
modified to support php 5)

still weird why =& would break in 5...

> Are you sure php4 works with this ? and that this is really the  
> same obj
> referenced ? To my knowledge without & php4 makes a copy of the  
> object.
> Nethertheless I think I never use this reference to the top node ;-)
>
>
>>> Remove the &, change to:
>>>
>>> $this->top = $parent->top;
>>>
>>> As this appears to break PHP 5 and the way it handles referencing.
>>>
>>> Testsite, etc all seems to work pretty well with that change.
>>>
>
> Sure, but afaik the & is necessary for php4.
> Maybe we should start a svn branch for php5 specific corrections ?

Would this be easily maintainable? Not sure how this branching works...

I guess there really is no chance of a version that runs in php 4 and  
5 without a lot of checks...?
for example: is_a() is depreciated in favor of instanceof, at least  
in some cases this breaks some existing behavior... The just commited  
Conf unittest in testsite that pass in 4 will fail in 5.

I would really like to see a php5 version of bc someday, since creole/ 
propel would be available then...

\bas

> -- 
> Jean-Christophe Michel
> _______________________________________________
> dev mailing list
> dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
> http://lists.binarycloud.com/mailman/listinfo/dev
>

_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev