New Proposed PHP Functions

These are a little late for April fools day, but none-the-less these are funny. We made these up whilst sitting around the office back in the summer. I thought I would put them out now, we've had them long enough. Hope you have a good laugh.

Proposed new PHP functions

In response to many recent projects, we'd like to propose some new PHP functions to help speed development time.

 


i_wanna($task)
$task is any task that needs to be done.?? Always returns TRUE.

Example:
$discount = i_wanna("give my friends a 20% discount on some items in my store");

 


because
A modifier to be used as a conjunction between control structures and those difficult to define conditions.? Normal use would require the logical reasoning (plain English is allowed right now, we'll need language packs to internationalize this) to follow the because keyword.? In cases where there is no logical reasoning, you must use just_because.

Example:
print "You need to use IE5" because our "web designers" don't know anything besides IFRAME and MARQUEE.

This works just as well...
print "You need to use IE5" just_because

 


beLike($url)
A simple function that will modify the behaviour and logic of the current PHP page to behave and appear like the supplied URL.? For projects where a client is constantly saying "but http://www.foobar.com has a really cool log in page!", you can simply have PHP emulate the features of the specified URL at foorbar.com

Example:

// my current page isn't very good
//
// and I want to be like an awesome Cold Fusion site
//
?$newPage = beLike("http://www.awesomeCFsite.com");
?echo $newPage;

?


integrate_with($externalApplication)

This function always returns a true, to make upper management happy.? The external application can be pretty much anything you need to integrate with - PHP can integrate with just about any application out there.? Linux, Windows, Sun, HP-UX, Mac, etc. - integrate_with() will make it happen.

Examples:

?$didIntegrate = integrate_with("c:program filescrystal reportsJane's reports*");
?echo $didIntegrate;
?


?$didIntegrate = integrate_with($clientJavaSystem);
?echo $didIntegrate;

Note that in the first example, you may need to escape the ' in any string passed to integrate_with(). This will addressed in future versions.? Use on Windows systems may need long file names translated to DOS 8.3 format.

 



add_solution($solutionName)

Again, this always returns a boolean.? Similar to integrate_with, but with a broader purpose, add_solution() allows you to easily add new industry standard solutions as they are developed (in some cases, beforehand - that's the power of open source).?

Example:

$newSolution = add_solution(E_BUSINESS);
echo "$newSolution has been added to your site";

As you can see, add_solution can be a powerful way to add new solutions to your site.? Current valid parameters (please use the system-defined constants for now) are limited to:

E_BUSINESS - an all-ecompassing e-business solution.
E_COMMERCE - a subset of the E_BUSINESS solution system.?
XML - more limited than the E_BUSINESS solution - often used in conjunction with integrate_with()
EDI - similar to XML, but for legacy systems
J2EE - similar functionality to E_BUSINESS
COM - used when adding solutions for Windows shops
TURNKEY - easily the most popular, for clients needing a turnkey solution.

New PHP Book by Rasmus from O'reilly

I was on the Internet today talking to Rasmus, the creator of PHP and he was talking about his new book. I managed to get a few juicy nuggets out of him about the book and who it is intended for.

Create your own language, create your own book. That seems to be the moto for Rasmus these days. He recently completed a new book published by O'Reilly called "Programming PHP".

I asked Rasmus who the book was intended for and he stated: "It's introductory, but aimed at a smart newbie. It doesn't hold your hand too long, just gets you on your way. For experienced PHP hacks, the online manual is all you need, you don't need this book"

"... people will buy the book just because its PHP and O'Reilly. It's not a bad book by any means."

So if you are looking for a "newbie" PHP that won't insult your intelligence then give it a try. You can pick it up here.
«April»
SunMonTueWedThuFriSat
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011