Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

Re: Why does Parser.php pass a value to my extension instead of a reference?

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


mickewiki at gmail

Oct 10, 2009, 1:25 AM

Post #1 of 3 (697 views)
Permalink
Re: Why does Parser.php pass a value to my extension instead of a reference?

Robert Rohde <rarohde <at> gmail.com> writes:

> PHP 4 and PHP 5 handle objects as function parameters differently.
> Mediawiki now considers PHP 5.0 or later as a prerequisite (5.1 or
> later recommended). The warning you quote is a plausible consequence
> of using PHP 4 under certain circumstances, so that is the first thing
> I would check.

Right, I'll see if I can get a hold of the guy again. Thanks for that.

Is there a notable difference between passing the parser object by reference
rather than as a value in this case though? I mean, if I can support PHP4 with
my extension with out any (notable) differences I could just as easily pass the
object as a value instead. I don't notice an difference in performance when I
try it...

/Micke




_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


innocentkiller at gmail

Oct 10, 2009, 1:31 AM

Post #2 of 3 (645 views)
Permalink
Re: Why does Parser.php pass a value to my extension instead of a reference? [In reply to]

On Sat, Oct 10, 2009 at 4:25 AM, Micke Nordin <mickewiki [at] gmail> wrote:
> Robert Rohde <rarohde <at> gmail.com> writes:
>
>> PHP 4 and PHP 5 handle objects as function parameters differently.
>> Mediawiki now considers PHP 5.0 or later as a prerequisite (5.1 or
>> later recommended).  The warning you quote is a plausible consequence
>> of using PHP 4 under certain circumstances, so that is the first thing
>> I would check.
>
> Right, I'll see if I can get a hold of the guy again. Thanks for that.
>
> Is there a notable difference between passing the parser object by reference
> rather than as a value in this case though? I mean, if I can support PHP4 with
> my extension with out any (notable) differences I could just as easily pass the
> object as a value instead. I don't notice an difference in performance when I
> try it...
>
> /Micke
>
>
>
>
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l [at] lists
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>

There's no point in targeting PHP4. Mediawiki doesn't support it anymore.

-Chad

_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


Platonides at gmail

Oct 10, 2009, 2:48 PM

Post #3 of 3 (634 views)
Permalink
Re: Why does Parser.php pass a value to my extension instead of a reference? [In reply to]

Micke Nordin writes:
> Robert Rohde <rarohde <at> gmail.com> writes:
>
>> PHP 4 and PHP 5 handle objects as function parameters differently.
>> Mediawiki now considers PHP 5.0 or later as a prerequisite (5.1 or
>> later recommended). The warning you quote is a plausible consequence
>> of using PHP 4 under certain circumstances, so that is the first thing
>> I would check.
>
> Right, I'll see if I can get a hold of the guy again. Thanks for that.
>
> Is there a notable difference between passing the parser object by reference
> rather than as a value in this case though? I mean, if I can support PHP4 with
> my extension with out any (notable) differences I could just as easily pass the
> object as a value instead. I don't notice an difference in performance when I
> try it...
>
> /Micke

You can't support PHP5 in mediawiki.
The warning you get was added on PHP 5.3 and doesn't affect that code
works OK. You should remove the reference to make the warning go away.


_______________________________________________
Wikitech-l mailing list
Wikitech-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.