Posts Tagged Php

Looking into PHP

I have started to look into PHP a bit. I have a general working-knowledge of it’s language, which seems to be the point at which most “developers” start to call themselves PHP developers or programmers. I have nothing against PHP; however, I have seen a lot of good money spent on bad PHP code and coders that have no idea how to write good software. It’s not the language, it’s the coders. But, I digress.

So, trying not to join that group, I decided to find out what “best practices”, unit testing functionality and other standards exist around PHP. I came across some helpful postings.

I am happy to see that there is unit testing support, and that is seems to be very standard xUnit-style; there even seems to be some support for mock objects.

There are quite a few web development frameworks for PHP, which is good; I will have to dig up a handful of them and see what they provide.

There is also decent IDE support, including an Eclipse plug-in (PDT).

Not sure where I will go from here, maybe put together a working project to try things out in a few real-world situations.

Popularity: 2% [?]

  • Share/Bookmark

Tags: , ,

Finding Duplicate Ints: PHP

In my over-long running thread about Finding Matching Ints (initial posting), I have have come across another solution from a php developer that I recently interviewed… in php.

1
2
3
4
5
6
7
8
9
function findInts($array){
    $out = Array();
    foreach($array as $num){
        if(array_exist($out,$num){
            return $num;
        }
        array_push($num);
    }
}

He also mentioned the pre-sorting approach as well in order to speed things up. I still need to fully validate the php functions that he mentions, but it seems correct. I also didn’t go into the error-case much with him, not really being a php expert myself.

Popularity: 3% [?]

  • Share/Bookmark

Tags: , ,

Switch to our mobile site