 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Erling Alf Ellingsen's Blog: PHP Must Die
by Chris Cornutt January 11, 2010 @ 13:49:41
In a (slightly inflammatory) post to his blog today Erling Alf Ellingsen shares why he thinks that "PHP must die", mostly due to some of the inconsistencies his has with other languages.
His examples include:
- String vs. numeric handling
- That PHP supports octal numbers "by accident"
- A lexer bug with hex values
- A parser bug involving the ternary operator
Comments on the post include those supporting the "die" opinion - that PHP just doesn't have it together like other languages - and those taking a bit more balanced approach on PHP's strengths and weaknesses.
voice your opinion now!
opinion lexer parser octal ternary
Pàdraic Brady's Blog: YAML for the Zend Framework - well, maybe...
by Chris Cornutt March 23, 2007 @ 10:49:00
On Pàdraic Brady's blog, he talks about some thought he had on a YAML component for the Zend Framework and some of the feedback he's gotten so far.
Since I'm used to the format from Ruby and Perl and since it's used for a similar purpose in the PHP Symfony framework, I also suggested using YAML configuration files since they are far more readable than XML and remain machine readable. I believe this went over quite well. Later on I realised the Zend Framework has no YAML support, and after some searching noticed the only (apparent) PHP parser was the Spyc library
So I fired off a few emails to the fw-general mailing list of the Zend Framework to see if there was any interest. I'd like to thank Matthew and Gavin for their feedback and I've since decided to have a go at implementing a YAML parser in PHP.
He notes that there is already a YAML parser for PHP5 (Syck), but that creating one for the Zend Framework is a different animal. He finishes up the post talking about where to start with the parser, what it is, and the next steps for him in its development.
voice your opinion now!
yaml parser zendframework component syck yaml parser zendframework component syck
Greg Beaver's Blog: PHP_ParserGenerator and PHP_LexerGenerator
by Chris Cornutt June 25, 2006 @ 17:00:41
Greg Beaver has blogged today with more about the port he's been wokring on of the Lemon parser generator to PHP5, this time discussion the creation of two packages - PHP_ParserGenerator and PHP_LexerGenerator.
Last week, I blogged about completing a port of the Lemon parser generator to PHP 5, which I thought was pretty cool. However, in an email, Alex Merz pointed out that without a lexer generator to accompany lemon, it's pretty difficult to write a decent parser.
After Alex's email, I started thinking about what it would take to write a lexer generator. Basically, a lexer generator requires parsing and compiling regular expressions, then scanning the source one character at a time to find matches. So, it occurred to me that perhaps simply combining regular expressions with sub-patterns could accomplish this task quite easily.
He goes on to explain this process, showing how a simple regular expresion call (and a look at its return arguments) could create a simple, easy solution. Since the re2c format is still unsupported in PHP (without a goto to go to), he opts to stick with the regular expressions and creates a "lex2php" format instead.
He's packaged up both halves of this setup and has already posted proposals for them to the PEAR site:
voice your opinion now!
pear lexer generator parser package lemon port php5 pear lexer generator parser package lemon port php5
|
Community Events
Don't see your event here? Let us know!
|