PHP Competition (have fun and show us your stuff)

What would a built-in PHP function look like if itself were scripted in PHP?

Try your skill in trying to re-create a PHP function of your choice! Learn from others as well as learning from your peers.

THE RULES:

1. You may choose any PHP built-in function or class that exists in the current distributed build of PHP.

2. You cannot use the original function or method of the one you are cloning, but you may have a recurcive call to the cloned function or method itself.

3. Your function must behave excatly as the way the PHP documentation describes the original function. Extra points if you can trigger errors just like the documentation explains as well.

COMMUNITY FEEDBACK:

1. If you find a conflict in somebody’s submission that does not adhere to the original PHP documentation, you are encouraged to share.

2. If you have more effecient ideas of somebody’s submission, you are encouraged to share.

3. When you comment on somebody’s submission, reply directly from the source post.

SUBMISSION FORMAT:
Please use the following guidelines when submitting a new cloned function:

Title you post of the name of the original PHP function or class name.

function_name()

Link to PHP documentation…

Code:


Return value type, function name, argument types as listed in the PHP documentation


Description given from the PHP documentation

PHP Code:


<?php
  
  
// Example PHP code - Prepend the function name with PHP_
  
  
function PHP_function_name(){
    
// implimentation code
  
}
  
?>


View full post on Tycoon Talk

, ,

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Get Adobe Flash playerPlugin by wpburn.com wordpress themes


RSS Site FeedRSS Site Feed

© 1992-2011 DC2NET™, Inc. All Rights Reserved