Slashdot Mirror


User: Dalfiatach

Dalfiatach's activity in the archive.

Stories
0
Comments
3
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 3

  1. Re:Seems strange to me on PHP 4 End of Life Announcement · · Score: 1

    I ask because it seems to me that anyone who has an informed opinion about PHP says it has serious shortcomings. I wonder if PHP is like Windows: acknowledged to be technically inferior, but widely used because it has a huge adoption rate.

    Personally I think (and this will almost certainly be considered trolling) that those who hate PHP and claim it cannot be used for complex projects are simply poor programmers....or perhaps, more accurately, unimaginative programmers. The kind of people who have to do things by the book at all times, who have little initiative. Coders like that need the ridiculously over-specced rigidity of what they consider "real" languages: all those rules make them feel nice and safe. Somebody else referred to the academic atmosphere, almost "high church theology" of J2EE and company - I though that was hugely insightful myself.

    I've built fairly substantial corporate projects in PHP. Large billing and e-commerce and purchase control systems. One in particular has been running happily for four years now and runs nearly all the global business of a medical device company - processing millions of euro a year. Every 6 months or so, I get a call to come in and do some work on it - and that work is, invariably, extending the system to cover even more of their business processes. It's really a mini-ERP at this stage. In PHP, running for years, everybody more than happy, and in those 4 years I've probably spent less than 10 weeks in total on actual development. Did the whole thing by myself, too.

    If I'd done it in Java (or .Net) it would have taken me 6 months and a whole squad of codemonkeys to get the first beta version out the door, and the damn thing still probably wouldn't be working properly, and every minor tweak would cost a fortune and take weeks. But I'd have used a "real" language, ye see, so that makes the cost and lack of actual delivery OK.

  2. LoM and DDR on 25th Anniversary of the Sinclair ZX Spectrum · · Score: 1

    For any others with fond memories of Lords of Midnight and Doomdark's Revenge, a free multi-user tribute is available at http://www.midnightmu.com/

    Yes, take up the War of the Solstice, playing against other real humans! Storm the Gap of Valethor! Lay siege to Ushgarak! Romp around the Icemark pretending to be a Giant...or an Icelord...

  3. Calling PHP from Perl on PHP and Perl in One Script? · · Score: 3, Informative
    So you've got Perl in your PHP, is there a way to do PHP in your Perl?

    I am in the joyous position of having to maintain a monstrosity of an application that was written by at least 4 different programmers over a period of years with numerous kludges plastered on top of a highly dodgy initial design.

    A lot of the early code was in Perl. Obfuscated, unreadable, indecipherable (and uncommented) Perl. So I decided to re-implement whole libraries of functions in PHP instead. But...a lot of what goes on in the application is driven by 2 Perl daemons, and they needed access to the new PHP libraries too.

    So:

    use LWP::UserAgent;
    my $ua = LWP::UserAgent->new;
    $ua->agent("PerlApplication/0.1 ");

    #construct the url (including GET params)
    my $varstring = "http://localhost/perlcalls.php";

    # Create a request
    my $req = HTTP::Request->new(POST => $varstring);
    $req->content_type('application/x-www-form-urlenco ded');
    $req->content('');

    # Pass request to the user agent and get a response back
    my $res = $ua->request($req);
    print "PHPresult: " . $res->content;
    # Check the outcome of the response
    if ($res->is_success) {

    #parse content of response
    if($res->content eq "OK"){
    print "PHP returned OK";
    }

    }
    else {
    #system failure, PHP unreachable
    print "PHP Failure!";

    }