Master the 'Run As' option in Eclipse PDT with PHP
Most of my development in Eclipse PDT with the results tested outside of it - using firefox. PDT has a few options in the Run… menu:
Most of my development in Eclipse PDT with the results tested outside of it - using firefox. PDT has a few options in the Run… menu:
PHP developers, raise your hand if you run an explain on each MySQL statement you write and use in your apps! Anyone? Ok… 1… 2… that’s it? Yah, I tend to forget that too, but luckily PHP allows us to cheat. Thanks PHP!
Arrays, return variables, expressions, OH MY! I recently learned a lesson about array functions in PHP not returning what I thought they would. I had a function that returned the value of array_shift()
… and then used it in another function. Unfortunately, this generated a strict error and was causing some issues… As usual, I put together a proof of concept. Let’s check out the code example, the error, and then why:
So many times during development, I’ve missed little PHP errors because they were 1) on a processing page that was redirected or 2) output inside of a html tag - and rendered invisible.
While working on a website for (“the triangle”), I came to a page running locally that just stopped - blank. This particular website was not using output buffering - so there is no excuse for a blank page.
In my posting about Integrating PHPDocumentor into Eclipse, I touched on External Tools a bit. The combination of external batch files, the external tools extra options and the console has made my life easier. I’m using two new additional batch files that I’ve written myself and integrated as external tools. These include automated SVN release update and resource refresh and Apache application control (for those who can’t run apache as a service on w32):
I generally don’t like to be tied to a specific IDE when developing. Additionally, I like to have my choice in using tools to manage my source control (tortoisesvn, svn command line, etc). I just think this is the open-source way - it seems to be just a more free-spirited way of developing and managing projects. With this in mind, I’ve been looking for ways to integrate my SVN into my current IDE (Eclipse PDT) but not limit myself from accessing my SVN repositories from the file system. I’ve found a great plugin to help with this - so let’s go over the specifics:
Today, Todd (one of the consultants that (“the triangle”) uses) called me up to share a bit of a reminder and also tell me about an issue in the code that was in one of our older modules. There was an issue with the strtotime function converting a year to a timestamp.
After I installed Eclipse PDT, I had two project navigators. I closed the native one and kept open the PHP Explorer. PHP Explorer showed my php, css, js, etc, files. It also puts a plus sign to the left of the filenames. Using this view, we can expand the file to see the classes and functions inside of the file without opening it.
So many phishing attempts lately are just purely pathetic - easy to guess and figure out, mis spelling and grammar issues and just poorly fashioned websites. Although these will work on the novice web surfer, can a clever criminal actually create a phishing site/scenario that can trap the experienced members in your IT department?