You are here: Re: PHP 4.4.4 vs Perl 5.8.7 for Object Oriented server code « PHP Programming Language « IT news, forums, messages
Re: PHP 4.4.4 vs Perl 5.8.7 for Object Oriented server code

Posted by www.gerardvignes.com on 02/04/07 00:29

I tried combing PHP objects into a much smaller number of scripts,
making sure to group by usage. I couldn't measure any difference from
using on script per file. That echoes what I.Rezvin said previously.

I am already using a variety of lazy evaluation, embedding
require_once(whatever) in conditional statements. I checked this, and
it works properly on both PHP 5 and PHP 4.4. The script will not be
included unless that branch of the conditional is reached and
executed.

I started modifying my code, inserting /* & */ to stipulate object
references in a variety of places where unnecessary object copies were
made. This theoretically allows my code to work with PHP 5, and yet be
easily modified using a SED pattern to work with PHP 4. I am not
convinced that this is the best approach, given that the code becomes
a bit messy and requires an additional step prior to deployment.

I have at least identified some areas that require & references:

1. $myInstance = & new MyObject();

2. function myMethod(& $myArgument) { ... }

I am not certain which of the following is required (or both):

A. return & $myGeneratedObject;
or
B. $myNewObject = & $myInstance->myMethod($myValuet);

Thanks,

Gerard Vignes
http://www.GerardVignes.com
Seattle, WA

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация