Matt's Blog

Archive for July, 2007

Tip of the Week: PHP Shorthand

Thursday, July 26th, 2007

And here starts a little series, “Tip of the Week”. I’ll post a little tip each week. Or, at least, until I decided to stop. 😛 (PS: I changed this to Week, instead of Day… 😛 )

To save time and file size, you can use “shorthand PHP”. To use this, this must be enabled in your php.ini (turn short_open_tag to on). Although not recommended for distribuatable code (since the user might not have shorthand PHP enabled), it’s great when you need to write something quickly. You can use <? and ?> for PHP opening and closing tags. You can even use ASP-like opening/closing tags, if asp_tags is set to on. You would then be able to use <% and %>. There’s also a shorthand for echo. <?= and <%= is equivalent to <?php echo. The previously noted options must be set to on to use the shorthand for echo, respectively. For example, <?='Text';?> would do the same thing a <?php echo 'Text'; ?>.

Harry Potter and the Deathly Hallows

Wednesday, July 25th, 2007

Harry Potter and the Deathly HallowsSo I went to Indigo on Friday at about 9:30 PM and lined up for the release of Harry Potter and the Deathly Hallows on Saturday at 12:01 AM. I’ve been reading it since. I finished it this yesterday around 2:30 AM. My cousin bought it for me (for my Birthday) and preordered it, so it was easier and, that way, we made sure we got a book (even though the Staff at the store promised everyone would get a book… and they had 2 pallets of books 😛 ).

This is definitely the best Book in the series! I was actually quite surprised at the ending, I thought it would be sort-of the opposite. But, I quite liked how it turned out.

I didn’t actually go on the my Computer until I finished the book… So, I came back to about 350 new items in Google Reader… 😛 It’s good to be back on my Computer. 😀

My Birthday

Wednesday, July 18th, 2007

It’s my Birthday today! I’m 15 now!

I already got my presents on Saturday. A Samsung SyncMaster 226BW Monitor, Company of Heroes (I’ll write a post on this later) and, well, money. 😀

PHP 4 Killed

Tuesday, July 17th, 2007

PHP 4 End of LifeThe PHP Team has released End of Life information for PHP 4. There will be no more releases of PHP 4 after December 31, 2007 (the end of this year), and critical security issues will no longer be patched after August 8, 2008.

PHP 4 was initially released on May 22, 2000. PHP 4 was a huge step-up from PHP 3, and people started using it soon after it’s release. PHP 5 was initially released on July 13, 2004. Although PHP 5 offered much more better things than PHP 4, PHP 5 adoption was taken very slowly. Mostly because PHP 4 offered everything people needed, and PHP 5 just improved on those features and added some other stuff that people didn’t really need, but they were useful. Even today, in 2007, PHP 5 is still second to PHP 4.

Hopefully the PHP 4 EOL will start to make people use PHP 5. Let’s face it, PHP 4 obsolete. Hosts have plenty of time to get PHP 5 on their servers, and software writers have lots of time to make sure their software works on PHP 5.

PHP 5 adoption by hosts would go a lot quicker if software starting requiring a minimum of PHP 4. GoPHP5.org is trying to get software writers to make PHP 5.2 a minimum requirement.

We’ve had this discussion on the WordPress WP-Hackers mailing list a couple of times. The majority wants to make PHP 5(.2) a minimum requirement. The “lead developers” haven’t really said much on the discussion, though. Although, by the looks of this post that Matt Mullenweg (founder of WordPress) wrote on his Blog, it doesn’t look like it’ll be happening anytime soon…

Samsung SyncMaster 226BW

Monday, July 16th, 2007

Samsung SyncMaster 226BWI got a new Monitor on Saturday! I got the Samsung SyncMaster 226BW. It’s about time I got rid of my old 17″ CRT Monitor (although, it still worked well). 😛

The Samsung SyncMaster 226BW is a 22 inch, LCD, Widescreen High Definition Monitor. It’s got a 2ms response time, HDCP, 16.7 Million colours and DVI (Digital) input. It’s high gloss black, with a silver “bezel”. It also has regular D-Sub (VGA) input; but who wants to use that? Not to mention that it’s Windows Vista Premium Certified (not quite sure what that means 😛 ).

This monitor is freaking awesome! The colours are perfect, it’s huge, no backlight bleeding (that I can see right now, at least) and it’s just… awesome! Brilliant, awesome, words hardly describe how great it is!

The colours on this Monitor are great. I’d recommend setting MagicBright to “Intelligent” for really vibrant colours. It’s also a nice clean, clear and crisp picture.

There’s actually quite a bit of “controversy” around this Monitor. Back when the Monitor originally came out, it was using a Samsung LCD Panel. Which is a great panel. Which all of the reviews from back then are based off of, the Samsung Panel. But, it was such a great Monitor that there started to be a shortage of them, and Samsung couldn’t keep up with demand. So, they decided to outsource some of the Panels to two different companies. One of them was AU Optronics and the other one was Chi Mei Optoelectronics. Thus, making the A, C and S panel. The A panel bring made by AU Optronics, the C by Chi Mei Optoelectronics and the S (the original Panel) by Samsung. Now, all these different Panels are not equal. Although, they were given specific instructions by Samsung. Both the A and C panels have different problems. The biggest ones are that the A has a noticeable Blue Dominance and that the C has bad backlight bleeding. The S is basically perfect. Now, they may have fixed these Problems by now, they’ve had 6 months.

I was lucky enough to get an S Panel. The first one we bought was a C, but we returned that and picked up another one, at another store, and got and S Panel.

The way to tell which panel is which, is that on the back of the Monitor (behind the plate that hides the inputs) there’s a sticker. That sticker has the model number, serial number, etc. Right after the model number (226BW), there’s a letter, either A, C or S. There’s your Panel type.

I didn’t think this Monitor would look this great. I mean, it looked good in the store, but once I got it home, and plugged it in, it looked awesome. Really good colour. I guess because of the lighting in the store and since I’m using DVI.

Overall, this is a great Monitor!

(yes, I did take that picture of it in the top-left 😛 )