SitePoint PHP Blog: The state of functional programming in PHP
14108
On the SitePoint PHP Blog today, Troels Knak-Nielsen has written up a post concerning the current state of functional programming in PHP.   With the rise of Javascript, and languages like Python and Ruby, functional programming is becoming more mainstream. Even Java seems to be getting closures in the next version, so does this leave PHP lacking behind or is there an unrealized potential hidden within?   He looks at a few different aspects of functional programming and sees how well PHP fits into them (like dynamic dispatch, binding a variable to a function and an implementation of currying for a function). This last option is the only "true" functional feature that PHP can realistically handle.
310656
Popular posts from PHPDeveloper.org for the past week:IBM developerWorks: PHP frameworks, Part 1: Getting started with three popular frameworksWeb Development Blog: Tutorial: FTP Upload via cURLJoey's Blog: 8 Practical PHP Regular ExpressionsJeff Moore's Blog: Keywords and Language SimplicityAlessandro Crugnola's Blog: AMFPHP and mbstringTravis Swicegood's Blog: Why Inheritance SucksStefan Mischook's Blog: Creating Custom PHP Functions Video Tutorial - Part 3Johannes SchlÃ¼ter's Blog: PHP 5.3 UpdateInternet Super Hero Blog: mysqlnd to support PDO, mysqlnd in PHP 5.3Jacob Santos' Blog: Object Oriented Programming Isn't Easy
727142
On the Metapundit.net site, there's a new (long) entry that takes a look at one of the programming styles, functional programming, and checks into its support in PHP. Unfortunately, it's mostly a swing and a miss.   I should just get this straight right off the bat: you can't really do much functional programing in PHP. Functions are not first class citizens and the equivalent of passing functions around is passing around strings or arrays and relying on convention. No really.   He goes on by illustrating the point that PHP can do this sort of thing but only up to a point. Once you start to get into anonymous functions and moving past things like the array_map function, you start to loose a foothold. The create_function function allows for a bit more flexibility, but still doesn't fulfill the requirements needed for full support.
448776
Sara Golemon describes the path she took in a search for an OpenID library to work with in PHP. The trip took her through both PEAR and PECL with no promising results. Heading off to a Yahoo! search she comes up with one good result - Auth_OpenID.   Now, granted, this is the first OpenID system I've looked at, and I haven't really dug into it in depth, but I've got to say, this is some clean, well written code and the author clearly understands the maths involved (or at least fakes it shockingly good).   Knowing this, she asks "why isn't this in PEAR" if it's so well-structured and useful? It works with any version of PHP from 4 up and is smart enough to adapt itself to whatever the structure of your application might be.   There's also some great comments on the post where it's explained why the library isn't in PEAR, another OpenID package for PHP and suggestions for alternate distribution methods (PEAR channel).
403472
Reinhold Weber has put together a list of signs (40 in all on his "programming list of shame") that you're a lousy PHP programmer. Here's a sampling:   don't see the need and/or benefits of a good programming IDE like Zend Studio or Eclipse PDT have never used some form of version control like Subclipse don't use a consistent methodology don't use test-driven development don't return content but echo or print it from your functions or classes return HTML, not data, strings, or objects. don't allow intelligent error handling you think reusable software equals/requires your code to be OOP   Now granted, some of them are a bit more high level than others, but if you're not headed towards a lot of these, you might change paths, hop out of that comfort zone and branch out into the community and the language a little bit more.
305676
Raphael Stolt has posted a book review of one of Manning Publishing's PHP-related books, "PHP in Action: Modern Software Practices for PHP".   Over the last few days I got the chance to skim through the upcoming Manning release "PHP in Action: Modern Software Practices for PHP" by Dagfinn ReiersÃ¸l et al. The reviewed book is seperated into four main parts, covering lots of interesting topics in a good and fluent writing style.   Raphael outlines the book, mentioning the four parts the book is divided up into:  Basic PHP tools and concepts Developing applications via Test Driven Development Web presentation and user interfaces Object-oriented development including things like database abstraction  Raphael gives the book a positive rating and recommends it for anyone that has the basics down and is looking to extend their knowledge that much more.
192641
DevShed has posted the second and last part of a series of two articles based around the Composite design pattern - using it to work with strings in PHP5.   Are you a PHP developer who wants to improve your skills in pattern-based programming in PHP? If the answer to this question is a emphatic yes, then you should begin reading this article now! Welcome to the final part of the series "Implementing the composite pattern with PHP 5." Comprised of two instructive tutorials, this series walks you through the basic concepts of this important design pattern, and shows you how to apply it with some educational examples.   They start by defining a simple StringProcessor class as an abstract interface to build from. From there, they create two other classes - the SingleStringProcessor and the MultipleStringProcessor. Each of these takes in either a single file or multiple filenames and spits back out the value of the string and the length of the string.
313545
Luke Welling takes a humorous look at something he misses in PHP - register globals being set to on.    I am aware that there are some things so shocking that you are not supposed to say them in polite company [...] so confronting that they are best kept to yourself regardless of how strongly you believe them. I have a similarly shocking sentiment that I feel I have to share.   I really like register_globals in PHP.    He reminicies about the days gone by of being able to assume that register_globals is turned on, the days of simpler, lighter code that's even easier for the newbies to get into. Anyone for a tshirt?
584229
Popular posts from PHPDeveloper.org for the past week:Reinhold Weber's Blog: 40 signs you really are a lousy PHP programmerScott Klarr's Blog: PHP Cheat SheetsDeveloperTutorials.com: Building Desktop Applications in PHPPadraic Brady's Blog: The Zend Framework and Microformats: Zend_Microformat ProposedCommunity News: GoPHP5 Project Wraps UpJob Posting: Technology Resources, Inc Seeks Senior PHP Developer (New York, NY)Job Posting: Red Ventures Seeks Sr. Systems Analyst/Web Developer (Charlotte, NC)Community News: Forage - A Search Abstraction LayerCommunity News: php|architect Launches C7Y Site (News/Podcast/Forums)Richard Heyes' Blog: SMTP for PHP 5
248750
This is a followup on Marco Tablini's discussion of the PHP programmer availablity and my earlier attempt at defining enterprise PHP.
366947
Lukas Smith is sending a wakeup call to the internet providers and web hosters out there - get involved in the PHP community!   We do not seem to have any ISP's active inside the PHP community. This is kind of odd, considering that PHP seems to be driving the business of hosters quite a bit. Why have none of them decided that PHP is important enough for their business that its worthwhile to ensure that their interests are taken into account?   He makes the suggestion of passing along the suggestion to bosses/co-workers/anyone who'll listen about getting involved. Suggested places to start would be as a part of the testers group or even contributing to the migration guide.
288007
After long discussions and much opinion being thrown around, Andrei Zmievski points outintegration of namespaces into the upcoming PHP6 release.   Ladies and gentlemen, we have namespaces.   According to the post from  \
336483
Here's what was popular in the PHP community one year ago today:Christopher Jones' Blog: Review: PHP Web ProgrammingCommunity News: PHP Conference BrasilWebReference.com: Creating a Custom RSS Feed with PHP and MySQLThe Shadow Fox Network: Create Dynamic URLs With Mod_Rewrite and PHP FunctionsJoshua Eichorn's Blog: Official WebThumb Contest rules publishedDevshed: PHP EmailHowTo Forge: Installing A LAMP System With Fedora Core 6ThinkPHP Blog: Oracle with PHP and PDODevShed: Creating an Administration Area for a Simple Threaded Discussion ForumDevShed: Setting up the Foundation for an Extensible Website Engine with PHP 5PHPBuilder.com: PEAR's HTML_QuickFormAndi Gutmans' Blog:  PHP and Database Connection PoolingInternational PHP Magazine: Poll Question: The Biggest Advantage of PHP 5 is?Greg Beaver's Blog: PhpDocumentor 1.3.1 is releasedAlexander Netkachev's Blog: Practical PHP events
126500
DevShed is starting up another new series today, this time looking at the DirectoryIterator methods out of the Standard PHP Library functionality.   Because this class might be handy to use in projects where handling directories is a must, in this new series I'll be taking a close look at some of its most important methods. We will explore these methods appropriately in conjunction with the corresponding code samples.    They introduce the class, noting why it's handy to use and where's the best place to use it - including an example. They get into a bit more detail, looking at the key() and current() methods as well as using the rewind() method to reset the pointer for the directory.
69166
On LinuxJournal today, there's a new article from Marco Tabini about the power of PHP as a multi-purpose language (and not just for web pages anymore).
84867
Tobias Schlitt has a great (long) post responding to a proposal made on the php.internals mailing list for the inclusion of "taint mode" in upcoming PHP versions.   Tobias starts with an overview of what "taint mode" is so that everyone's on the same page. His example involves the incoming and outgoing data usually involved in an application and how the incoming can be the most problematic when it comes to the values inside. This is where taint mode can come to the rescue. At its most basic level, it's a method for, assuming everything coming in is "tainted", creating a mechanism to automatically clean the data before it's even touched.   With the basics down, Tobias looks back to the proposal for a few additional comments. He considers the proposal a great way to introduce the functionality to the language. There are some draw backs he mentions, though, including the additional overhead of working through every inputted value.   Overall, I think this whole thing would be a great addition to PHP and I hope this could come for 6.0. What do you think?   You can also check out some other opinions on the matter:  "Tainted mode" pour php on the Kamelot Blog
277396
Lukas Smith has posted his review of a book from Packt Publishing - "PHP Web 2.0 Mashup Projects: Practical PHP Mashups with Google Maps, Flickr, Amazon, YouTube, MSN Search, Yahoo!"   Duane from Pakt asked me if I would be interested in reviewing a few books for them in my blog. I picked "Mashup Projects" from the list of just released books, since I am interesting in the topic and I am actually going to give a presentation at the internal "PHP Day" we are doing at Optaros in November.   He points out the good (good writing style, well-chosen examples) and the bad (a log list of errors and oversights in the code). He also talks about the contents of the book - the different examples and the final more major project. Overall though, he sees it as a good book, one that would be a good introduction to mashups for PHP developers (if you look past the formatting issues).