Jeremy's Blog

Tag: PHP

Re: Octopussy numbers in PHP

by Jeremy on Feb.01, 2008, under Uncategorized

John Lim made a post about a problem he had with certain output that he believed should be the same. He requires registration for comments, and I couldn’t be bothered, so here’s my response.

Check out the integer literals example in the PHP Manual for the answer to why he’s having issues. His sample code is:

echo 09," => (09) <br>";
echo 9," => (9) <br>";

The reason that doesn’t work as expected is because 09 when used as an integer is interpreted as an octal number. So, the result that he’s seeing is:

0 => (09)
9 => (9)

That’s just how integer literals work and it’s documented behavior. It’s not a bug. Well, it’s a bug in his code, but it’s not a bug in PHP.

Comments Off : more...

How low can you go?

by Jeremy on Feb.01, 2008, under Uncategorized

CIO has an article up entitled “You used PHP to do WHAT?” in which the author describes some of PHP’s supposed “shortcomings” … From reading the article, it becomes quite apparent quickly that the author really doesn’t have a clue what he’s talking about.

Here was my response to his absurd Facebook reference:

 

OK, to finally rid myself of any more Facebook references, you folks should all read this link:
http://developers.facebook.com/resources.php

and this link:
http://developers.facebook.com/documentation.php

So what? Facebook uses a standard API that can be INTERFACED by languages besides PHP? How does that prove your point in the slightest?

You, sir, are a tool. This entire article is nothing but link-baiting FUD. You claim to be a PHP developer, but you apparently don’t know even the basics of scaling and security in PHP applications.

You and the editors of CIO should be ashamed of yourselves for letting such poor content through.

And what a hypocrite. Saying the things you do about PHP when this site is running off of a PHP-backend from a pre-packaged CMS product (Drupal).

FUD really annoys me. What annoys me more is that this publication is targeted more towards management-type people. So, if you’re a PHP Developer, the person reading this article could very well be your boss. How are you supposed to cope with your boss having these types of “facts” on hand when it comes time to decide what technology to move forward with? Especially, when most managerial types I’ve met don’t know much more than what the author of this article apparently does.

2 Comments : more...

Microsoft Throws Yahoo a Bone

by Jeremy on Feb.01, 2008, under Uncategorized

I have to admit that I’m a little concerned about this. Apparently, Microsoft wants to buy Yahoo and threw $44.6 billion at them in an offer.

My question is what does this mean for PHP if Yahoo accepts the offer? Not enough major players use PHP and Yahoo was one of our best aces to throw when people started talking down about the language. What’s Microsoft going to do with Yahoo if they buy them out?

Maybe someone with a little more knowledge on the issue can shed some light somewhere …

2 Comments :, more...

PHP 5 Certification

by Jeremy on Dec.10, 2007, under Uncategorized

As you can see from the new button at the top of the site, I passed the PHP 5 Certification Exam. :)

2 Comments : more...

Let Me Clarify …

by Jeremy on May.21, 2007, under Uncategorized

(Repost from Privett on PHP)

My response to this comment (comment link no longer available) ended up getting too long for a comment. It would’ve just been overlooked. So, let me take a minute to clarify.

Stefan is the only individual I called out, because he set himself up to be called out. And “chips on my shoulder” come from watching PHP slowly get replaced in companies, because of the belief that it’s not ready for Enterprise-level development. And you want to know why? These very antics by the aforementioned people. I’m here, because I want PHP to succeed in the realms that it’s failing in. Yeah, Enterprise development using PHP has been on an uptick, but it’s been SLOW. And there’s plenty of things that Zend and the PHP Group can do to fix this.

The fact of the matter is, something needs to change, somewhere. And as unlikely that it is that anyone in the PHP Community is going to listen to someone calling them out on their faults, it’s got to be done. If someone doesn’t realistically say “Hey, this is a problem. You need to fix it.” everything is going to stay the way it is, and PHP is going to continue to drag its feet behind other languages, in the enterprise.

That’s why I commend Stefan for what he does in the Community, but highly disagree with the tone in which he uses to do it. He was called out because he IS pretty much the reason that PHP is as secure as it is, today. And that’s something that we do not, as a Community, want to lose. But, as long as he keeps pushing against the community in the ways that he does, the Community is going to instinctively push back. That’s not getting to solutions, it’s only causing more problems.

But, he is not the underlying problem, either. Zend and ALL of the PHP Developers need to step back, take a long look at what’s been accomplished and where they want PHP to go, and decide on a REAL plan. Not this haphazardly doing things as it’s interesting or whenever I feel like it. They have the power to do it, it’s just whether or not they want to do it.

Also, I’m not here to incite problems within the community. Everything I’ve said has been pretty much constructive criticism, and not intended to be taken negatively. “Is PHP Doomed?” was a question, not a statement. And probably too strong of one, as I went on to say, later. Of course PHP’s not doomed. It has a long way to fall before it could be considered doomed. But, if it did start that descent, I hope the PHP Group and Zend would be able to fix whatever mistakes were being made to get it back up to where it needed to be.

And if you do want to keep using PHP, in the future, “Letting them do what they want” isn’t an option. As the community behind the language, we all need to step up and let them know that they need to take some serious time, get their hands out of the code, and resolve some of the issues that keep causing problems. Whether it be communication errors, errors in leadership, etc. The PHP Community is HUGE, and if we were to all speak in unison, we WOULD be heard. It’s all about whether you intend to sit idly by while more problems keep cropping up, or take a stand to help better the language that you love.

And I commend Stefan Esser for taking that stand. I just wish he’d stand with an attitude that wasn’t so demeaning and “be the better man”, as cliche as that is.

Comments Off : more...

Speaking of egotistical …

by Jeremy on May.20, 2007, under Uncategorized

(Repost from Privett on PHP)

Stefan Esser of the Hardended-PHP Project released a patch for the Reference Counter Overflow vulnerability that was disclosed during the Month of PHP Bugs.

Just reading the title of the entry through my Live Bookmarks in Firefox, I can’t help but think “Thank you, Stefan, for fixing a security vulnerability in PHP and making the language that I love that much more solid and secure.” — Okay, maybe that was a bit of an exaggeration, but it needs to be said that Stefan Esser does do PHP a good service through finding and reporting these kinds of vulnerabilities.

The problem with that is the fact that any good service he does to the language is completely nullified by his attitude towards the PHP Developers and Zend. The chip on his shoulder is not helping the PHP Community. This type of behavior is no better than that I mentioned in my previous entry, by the PHP Developers themselves.

I know he’s got his reasons for having issues with the developers, and if everything he’s constantly ranting and raving about is indeed true, all the more reason to have issues. But do not lower yourself to their level, if that’s the case. Constantly and consistently belittling PHP Developers and Zend Employees, whether on your blog or in the PHP Internals list itself, does not make you any better than them.

This very behavior is part of the reason why PHP isn’t floating as well as other languages is the sea that is “the Enterprise” — You show businesses these kind of antics, and they immediately look to more outwardly stable communities, like Python for example. Or .NET. Like Rich Zygler said, “Besides, what kind of arguments do the internal devs in Redmond have over .NET? Oh that’s right. We aren’t really privy to that information.”

If you aren’t friendly and supportive to your fellow developers, what makes you think Enterprise-level businesses are going to think you’ll be friendly and supportive to them?

You want to know why PHP isn’t suitable for Enterprise development? Because, no one is showing Enterprise-level standards. Until you get the proper respect with regards to yourselves and each other, don’t whine and cry that businesses are picking .NET or Java over PHP for their Enterprise development.

Integrity is doing what you know is right, even when you think nobody is watching.

Comments Off : more...

Is PHP Doomed?

by Jeremy on May.17, 2007, under Uncategorized

(Repost from Privett on PHP)

As an outsider looking in, and being a realist instead of a fanboy, I’m finding it extremely hard to believe that PHP is going to continue its much hyped and proclaimed success in its current circumstances.

For example, I think if some of the tiffs that occur on the PHP Internals were ever widely publicized, PHP really wouldn’t have a future. It’s sad to realize that I now watch the Internals Mailing List for comic relief and not real information.

I want to know when the PHP community turned into this huge pissing contest. Some of the egos that are just dripping off of these developers are intoxicating. If it’s not one thing, it’s another.

As much as I hate to say this … You guys really need to take some advice from Ruby Devs. I’ve been watching the Dev List over there and following it as well, and I don’t see even half of the virtual crap-flinging that’s almost become an everyday occurrence on the PHP Internals list. Get a clue, guys. If you don’t start working together, your project will ultimately fail, or you can walk away and quit so we can get better people to replace you.

I’m not calling out any names, because there are some genuinely good people that work on PHP, but I think the general populace of egotistical people that generally initiate the pissing matches know who I’m talking about.

… if they even read this.

1 Comment : more...

Zend’s Getting It Together? Not Quite …

by Jeremy on May.17, 2007, under Uncategorized

(Repost from Privett on PHP)

As if it were a (pseudo) answer to my prayers, something very interesting came down my RSS Feeds, today.

Zend is apparently holding a survey on PHP IDEs. Downside? In their list of source control systems to support within the survey, they neglected to mention Seapine’s Surround SCM. Gah, just when I thought that they were possibly going to implement the missing features to make my life so much easier.

Oh, well. Maybe, they’ll at least get the Unit Testing support right.

I think I’ll take Paul Colton (thanks for your comment!) up on his offer to submit my requirements for a PHP IDE …

Comments Off : more...

PHPUnit support in PHPEdit

by Jeremy on Mar.31, 2007, under Uncategorized

I’m really starting to get disappointed in PHP IDEs. Because, I find one that works really well that I love (Zend Studio) but it falls short in respect of two things. The first being the lack of the ability to add support for other source control systems besides CVS and SVN. Second being the lack of built-in support for Unit Testing.

PDT (the Eclipse plugin) is very project-based. It offers up a lot of features that Zend Studio offers, with the added bonus of being built into Eclipse. And Eclipse has a plugin to support the Source Control System we use at work. Eclipse also has a plethora of other very useful plugins, like Aptana. PDT, unfortunately, offers no code inspection support for files outside of projects. That’s a bummer, because I have to jump in and out of various files in various locations that may or may not be apart of any project. So, PDT is missing ZDE staples, but has the benefit of being an Eclipse plugin, meaning I can have my source control integration.

Enter PHPEdit, which I’ve never used, but just learned that it’s going to solve the other problem, in an upcoming version. But not the first. I probably won’t use PHPEdit, except maybe to play around with, but the Unit Testing support is intriguing. If Zend Studio or PDT could get this in, that would be great. If Zend Studio could get this and alternate methods of adding source control support, that would be even better. I’m still waiting to see if PDT will be able to replace Zend Studio or not. Lately, I’ve been using them rather interchangeably, but I’m really wanting to move back to Zend Studio… Time will tell, but I wish these IDE developers would get it together.

3 Comments :, , more...

Running PHP6 in WAMP

by Jeremy on Feb.07, 2007, under Uncategorized

I’ve been wanting to start using PHP6 snapshots as part of my development process to ensure that my work (especially the Engine) is forward-compatible with the changes being made across the PHP Core. So, I set out on a little endeavor to make the PHP6 snapshots work in WAMP.

First, you’re going to need the latest version of WAMP. So, go to the site using the link above and grab the download. Now, my change is based on the PHP 4.4.4 Add-On (also, don’t install this Add-On if you want the switch to work properly), so it’s pretty simple to do.

Go grab the latest Win32 6.0-dev Snapshot from snaps.php.net. You’re going to need to extract this into your wamp directory as “php6″ so that you’ve got <path_to_wamp>\php6\php6apache2.dll … Now, copy the php.ini-dist file into <path_to_wamp>\Apache2\bin\ and rename it to php6.ini. You’re also going to want to open this file and change your extension_dir to <path_to_wamp>/php6/ext/ …

Now, save this file into your <path_to_wamp>\scripts\ directory as switch.php … You may have to modify this file to change the line:

$mphp6 = “php5_module”;

to

$mphp6 = “php6_module”;

This tripped me up last night, because php6apache2.dll was still registering as php5_module as of last night’s snapshot. I poked the internals mailing list and found this out from Antony Dovgal, who also said that this should be fixed in the next snapshot. I haven’t tested this to see if it has been fixed yet, though.

Anyway, after you’re done with all of the above, fire up WAMP and then open the command line. cd to <path_to_wamp>\scripts\ and then php switch.php (assuming you’ve got a path to a PHP binary in your system path — if not, you’ll need to use <path_to_wamp>\php\php.exe switch.php). This should shutdown Apache and swap out the PHP5 data for your PHP6 data. After it’s complete, and Apache restarts, check your phpinfo() and you should see PHP 6.0.0-dev.

And that’s all there is to it. :)

1 Comment :, more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!