php-general Digest 25 Sep 2012 11:10:28 -0000 Issue 7979

Topics (messages 319240 through 319244):

Re: Joining a team, where no wiki or docs are available
        319240 by: tamouse mailing lists
        319242 by: marco.behnke.biz
        319243 by: AmirBehzad Eslami

install PHP 5.4 by RPM
        319241 by: lx

memory allocation
        319244 by: Marcelo Bianchi

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Mon, Sep 24, 2012 at 5:07 PM, Daevid Vincent <dae...@daevid.com> wrote:
> That is a good point. We do not do unit tests here. Nothing against them, 
> it’s just a bit overkill for our needs. We build lots of websites, not one 
> massive SaaS.
>
> But I’m not saying do not use OOP. I’m just saying not everything has to be 
> OOP. It’s a subtle but significant difference.
> We have OOP classes for our database connection (and of course the helper 
> routines), memecache access/purging/etc., and then objects for actors, 
> movies, scenes, search results, HTML templates, email, tickets, etc…  again, 
> use the right tool for the job. When all you have is a hammer, everything is 
> a nail. Build a toolbox. ;-)
>
> From: AmirBehzad Eslami [mailto:behzad.esl...@gmail.com]
> Sent: Monday, September 24, 2012 12:47 PM
> To: Daevid Vincent
> Cc: PHP General Mailing List
> Subject: Re: [PHP] Joining a team, where no wiki or docs are available
>
> Wow. David. That was a great help with every detail !
> Thanks for sharing that with us.
>
> One side question:
> Without OOP, how do you handle Unit Tests?
> Do you know a Testing framework for procedural code?

Wait, what? Unit testing has been around longer than OOP.... There
weren't the nifty frameworks that make unit testing classes so much
fun today, but you know you can *still* use them on procedural code.

--- End Message ---
--- Begin Message ---
AmirBehzad Eslami <behzad.esl...@gmail.com> hat am 24. September 2012 um 16:05
geschrieben:
> What approach do you use in a similar situation?
> Is there a systematic approach for this?
> Is there reverse-engineering technique to understand the design of code?

Hi Amir,

my first start in such situations is

-> phpDocumentor or anything like that
-> xdebug + Cachegrind

This way + a few requests and you'll get with the help of the profiling logs a
good overview about the code and where the data flows.

When you now browse the code, make sure you'll put comments everywhere you go
and setup the wiki for yourself to document any kind of workflow you find.



Marco Behnke
Dipl. Informatiker (FH), SAE Audio Engineer Diploma
Zend Certified Engineer PHP 5.3

Tel.: 0174 / 9722336
e-Mail: ma...@behnke.biz

Softwaretechnik Behnke
Heinrich-Heine-Str. 7D
21218 Seevetal

http://www.behnke.biz

--- End Message ---
--- Begin Message ---
Wow. David. That was a great help with every detail !
Thanks for sharing that with us.

One side question:
Without OOP, how do you handle Unit Tests?
Do you know a Testing framework for procedural code?

--- End Message ---
--- Begin Message ---
Hello:
       I have installed the PHP and Apache by RPM, and the version of rpm
packets is:

httpd-2.2.3-63.el5.centos.1.x86_64.rpm
apr-1.2.7-11.el5_3.1.x86_64.rpm
apr-util-1.2.7-11.el5.x86_64.rpm
postgresql-libs-8.1.18-2.el5_4.1.x86_64.rpm
gmp-4.1.4-10.el5.x86_64.rpm
php-common-5.1.6-27.el5.x86_64.rpm
php-cli-5.1.6-27.el5.x86_64.rpm
php-5.1.6-27.el5.x86_64.rpm

     As you see, this version of PHP is 5.1.6, so I want to installed PHP
5.4.
I want to know the list of PHP 5.4 RPM packets, these can replace the
 php-common-5.1.6-27.el5.x86_64.rpm,
php-cli-5.1.6-27.el5.x86_64.rpm and php-5.1.6-27.el5.x86_64.rpm.

Thank you.

--- End Message ---
--- Begin Message ---
Dear list,

I developed a script that have to create considerable array of integer numbers in memory. Currently my script has to accommodate in memory two arrays of around 120.000 numbers (for one year of data, I would like to reach a 2 years per query) that are loaded from a mysql server.

I developed the script on a ubuntu 32bit machine and when I bring this script to our server, a 64bit opensuse the normal 128M of memory limit from php was exhausted.

On my ubuntu system the script was consuming around 30Mb of memory / year, on the opensuse to run the same script it consumes more than 90Mb / year of memory.

Is there a way to reduce this memory consumption on a 64bits machine ?

Also, I made a test with four different virtual box machines (two opensuse and two ubuntu machines with the same PHP version, opensuse 11.4 and ubuntu 11.04 all running php-5.3.5) and it was quite choking the result for me. I am still wandering what is the difference between those and how to explain the results.

A print screen of my machine running the four virtual boxes can be seen at:

https://sites.google.com/site/foo4funreborn/phpcomp

I would greatly thanks any help,
with my best regards,

Marcelo Bianchi

--- End Message ---

Reply via email to