PHP Design Patterns PHP Job Interview Questions

17 04 2008

As a PHP contractor, consultant, and freelancer, Larry Truett from San Diego who goes by the alias Fluffycat had a fair number of interviews - and sometimes he’s been asked technical questions. Here are a few to help you prepare for your next PHP job interview.

=,==,=== - what is the difference between these?

= assigns a value, == checks if value is the same, === checks if value is the same and the variables are of the exact same type.

Echo, print, printf - what is the difference between these?

Print and echo both output what is passed to them. Print acts like a function, so you can use it in complex statements. Printf is used to format the output.

Include, include once, require - what is the difference between these?

Include will includes a file each time it is called. Include_once would only include a file one time, so if a php program has a file in two include_once statements only the first will be done. Requre is like include, but if the file included is not available a fatal error occurs and processing stops.

Read the rest of this entry »

Share/Save/Bookmark



Facebook Shocker: New Privacy Controls Sort of Naive

17 04 2008

Chris Soghoian reports on Facebook’s new privacy controls, which feature the ability to classify what kinds of people can view particular elements of their profiles:

“This sounds like a great idea, and should be a significant benefit to those students who find that their Facebook-advertised parties were busted by police who found out about the events through the social-networking site.

“The primary problem is that Facebook has no way of determining what someone’s university status is. The company is only able to verify that the user has a valid .edu e-mail address, which could mean that the person is a student, staff member, professor, or alumni. As a result, Facebook asks users to self-report this information.

“Given an example situation where a student doesn't wish for the Facebook-using professors at their university to be able to view their profile, it would be trivially easy for a professor to log in, and change his or her own status to that of an undergrad.”

Yoinks!

“This new system provides little in the way of real additional protection, yet may give users a false sense of security, leading the millions of users to post even more stupid and embarrassing things to the site than they currently do.”

Which gets us into the territory of encouraging people to just not put stuff up on Facebook that they wouldn’t want to put up on billboards all over town.

Source: http://www.opennetworkstoday.com/2008/03/facebook-shocke.html

Related link: http://www.cnet.com/8301-13739_1-9898098-46.html

Share/Save/Bookmark



Domain Name Service (DNS) - What is DNS?

27 05 2007

Phone DirectoryThe Internet system that translates human-understandable hostnames (like www.ozarweb.com) into computer-understandable IP addresses (like 85.108.12.214) and back again.

Think of it as the Internet phonebook.

Share/Save/Bookmark



Del.icio.us or Not

9 04 2007

I resisted not to sign up with a del.icio.us account for a loooong time, but in the end (and that is about a couple of days ago) I decided that I should keep up with the trends since I’m a blogger getting deep in the rabbit hole day by day.

So I did. At first I had a little bit of difficulty in understanding how it works, because it does not seem to allow you manually add links (bookmarks) without importing a whole bunch of bookmarks, neither did it seem to work in an attempt to import individual Internet Explorer shortcuts (.lnk files).

In the end, I thought it might be a good idea to import all of my Safari bookmarks from my Mac which could be an alternative way of transferring my stuff to use elsewhere including my PC. After all, isn’t this partly why Del.icio.us was established?

So far so good, the annoyances began when I was browsing through several hundred bookmarks on my del.icio.us page and suddenly this happened:

Del.icio.us error page
Next, I contacted Yahoo! informing them about this bug. As a newcomer to del.icio.us and a newbie, my first impressions are thumbs down.

Bloggers need add-ons and extras which actually do work and the last thing they (we) need is another buggy third party service. 

Share/Save/Bookmark