PHP 5 Released; PHP Compiler, Too 524
TheTomcat writes "After years of anticipation, PHP 5 was released today. This release represents a milestone in the evolution of PHP. It sports the new Zend Engine II, a completely re-worked object model, and many many new features. Check it and the changelog out."
In other PHP news, remote_bob writes "There have been many attempts, like
BinaryPHP
and PASM,
but finally there is a complete
compiler
for PHP. The Roadsend compiler produces standalone, native executables, and supports the entire PHP language (but not all extensions). It uses
Bigloo Scheme
to do its job, a variant of Lisp, the language that
Paul Graham writes about.
Benchmarks say that performance is pretty good. Is this another sign that dynamic languages are the future?"
Thanks PHP team (Score:3, Informative)
Thanks again PHP team!
Re:PHP is moving in the right direction (Score:5, Informative)
Bottom-line: Very few people will have problems doing the upgrade. Of course you should thoroughly test your site before upgrading.
Re:Cross Platform? (Score:5, Informative)
Check out the downloads section [php.net] at php.net for Windows binaries and *nix source, and here [apple.com] you can find more details on PHP under Mac OS X.
As for the compiler in the story, I haven't tried it before so I don't know.
PHP compiler is nice, but expensive! (Score:5, Informative)
$400 for the license, which is only good for one year. After that, it won't compile until you renew.
Doesn't seem worth it for the casual hobbyist...
Re:PHP Compiler (Score:4, Informative)
The compiler generates binary code that is executed directly by the CPU, avoiding the intermediate process of compiling to bytecode and running in a virtual machine
That's a true native compiler to me.
A Book Recommendation (Score:5, Informative)
Re:$$ for compiler (Score:3, Informative)
And if they can do it, why can't we... how long till GCC compiles php code?
Re:Goodbye Perl? (Score:5, Informative)
Re:Am I the only one... (Score:5, Informative)
The products they produce to support the development of php the closed source.
You do not need to touch, use or otherwise dirty your poor soul with any "non-free" software to use php.
There is nothing wrong with this business model, get over it.
IonCube (Score:3, Informative)
(no, I have no affiliation to them)
PHP 5 Tutorials (Score:4, Informative)
Re:Cross Platform? (Score:4, Informative)
PHP 5 Section on Zend.com (Score:5, Informative)
I also posted the first chapter of my PHP 5 book in that section which gives an overview of what's new in PHP 5. This book will be part of the Bruce Perens series of Prentice-Hall and will therefore be open-source and freely accessible to anyone.
Yahoo Store, of course, is in LISP (Score:5, Informative)
LISP's parentheses turn everybody off, including me, but the data structures really are a win for tree-like applications.
Re:PHP is moving in the right direction (Score:5, Informative)
Re:Dynamic languages? (Score:5, Informative)
Sometimes, it also implies things like dynamically extensible type definitions at runtime, automatic memory management, and support for various functional-style features such as closures.
Compiling a dynamic language to machine code is usually a challenging problem.
Re:Compatible? (Score:3, Informative)
The only situations where you're likely to hit problems are in reassigning $this in OO code, for example if you had constructors which would go
$this = new My_Error_Class();
Which is no longer supported.
Re:PHP is moving in the right direction (Score:2, Informative)
OS X? (Score:2, Informative)
thanks Marc.
I cant wait to play with the final XML/DOM-3 libs.
I hate to say it.... (Score:3, Informative)
Just to clarify this, consider the following:- ASP.net's been precompiled since the 2000 beta, and it's been production ready for years. The C# language is also fully documented and is a public standard ratified by the EMCA.
PHP5, however nice, is treading old water, and in terms of functionality is still lagging behind even Java/JSP. The whole reason I'm assuming people stuck with PHP4, rather than move to something more robust that provides this kind of capability, is that:-
1) They're apathetic about new technology.
2) If the old language does what they want, why upgrade. It's *Personal* Home Page, after all, not corporate homepage.
3) Why make things more complex, for very little benifit.
Performance wise, the compiled version advantages are fairly insubstantial, and 99.9% of the new stuff they've added could have been done in other ways using the existing language.
The whole thing seems pretty stagnant, and I'm guessing there's a small chance that the PHP guys are stuggling to find their own space between the land of true pre-compiled OO languages and the interperated world that lay behind it.
I've worked with PHP4 and ASP.net since both of them were betas, and if PHP wants to be a serious consideration for large scale development, it'd better decide which side of the OO fence its on, and stay there.
Re:Why Perl is still the Regex king (Score:2, Informative)
Re:Goodbye Perl? (Score:2, Informative)
-- Cyrus (http://blogs.msdn.com/cyrusn [msdn.com])
Re:Goodbye Perl? (Score:2, Informative)
i dont work for zend; i bought the package (think its a good deal).
if you insist on free software, there are a number of free php code caching apps as well as development ides available...
PHP is powerful, but weak in some aspects (Score:2, Informative)
In my experience, the memory management in PHP is not good. Coding should be very careful, or the memory will be usually exhausted.
Another problem is the speed. Well, it is inevitable that interpreter execution is slow. However, I think PHP can run at least twice than current version if the inner architecture of PHP could be carefully rewritten.
Additional, I hope PHP could be multithreaded. When develop a serious application, multithreading or multitask can help programmer lots. And also the efficiency of application could be higher.
I hope these problems could be solved in PHP 5 or later versions.
If you are interested in apia, check : http://clonefab.net/, but there is no English web site yet, sorry for this. It is developed in Chinese language initially. The English document will be ready ASAP. As for apia package itself already support english. You can download it in : http://clonefab.net/apiaDownload.php
Re:IonCube (Score:3, Informative)
Re:PHP is moving in the right direction (Score:5, Informative)
Re:Goodbye Perl? (Score:2, Informative)
and also Creative Expression [microsoft.com]
Parens don't turn everybody off (Score:3, Informative)
Re:Thread Safe yet? (Score:5, Informative)
Re:I hate to say it.... (Score:2, Informative)
ASP.NET is a completely different class of thing. Of course it's been pre-compiled, because just like the other
There's no real advantage in compiling most PHP code because the life cycle of a script is so short, compiling really wouldn't make much difference. If you're going to be doing so much processing with a script that it requires compiling most people have either:
1) written the script in another language
2) compiled some C code and then exposed it to the PHP interpreter (using swig or somesuch).
But the issue doesn't come up that often because if you're writing things well, php is usually fast enough.
The whole thing seems pretty stagnant, and I'm guessing there's a small chance that the PHP guys are stuggling to find their own space between the land of true pre-compiled OO languages and the interperated world that lay behind it.
Stagnant? Have you seen the RAW amount of libraries available for PHP? Have you seen the language changes that have been going on for 5? Obviously not. You're spewing marketing BS with no knowledge.
1) Modules are constantly written for PHP because it's such a simple language to extend.
2) The changes in 5 are very significant for those who actually have to USE PHP, and that should be apparent to ANYONE who takes time to read the changelog.
I don't know where you come up with "stagnant" other than what it "feels like" to you.
PHP5, however nice, is treading old water, and in terms of functionality is still lagging behind even Java/JSP.
Examples Mr. ASP? Sounds like more marketing style bs. Post some examples. ( and watch them be refuted in no time flat )
I've worked with PHP4 and ASP.net since both of them were betas, and if PHP wants to be a serious consideration for large scale development, it'd better decide which side of the OO fence its on, and stay there.
1) Why the fuck work with ASP.NET when C# is out there?
2) As much smarter people out there have commented, there is not necessarily a correlation between OO and "scaleability".
Just because PHP doesn't have a large "class library" doesn't mean that it's immense functional library is irrelevant. Far from it.
The whole reason I'm assuming people stuck with PHP4, rather than move to something more robust that provides this kind of capability, is that:
Care to mention WHAT kind of capabilities you're talking about?
Personally I think PHP is good for a great many things, though I like other languages like Python, C#, C++, and Java better for my own stuff. Why don't you post some specific examples though instead of just getting a woody for ASP.NET?
Re:Goodbye Perl? (Score:2, Informative)
Yes I do use preg_match() quite often, but apparently I've never needed to match a backslash. I humbly apologize, and realize you are correct.
HOWEVER, other than that I can't think of anything too hard about the quoting style of PHP. You've got interpolated, non interpolated, and HEREDOC. *shrug*
Re:Don't you mean "Goodbye PHP"? (Score:2, Informative)
Except for speed.
Re:Compatible? (Score:5, Informative)
Yuck.
As a person who codes entire 20,000+ line application libraries in PHP and has been watching the development of PHP 5 very closely, there are a lot of decisions the PHP developers have made that make me very hesitant about going anywhere near the new PHP version.
As an aside, the PHP developers have decided to make SQLite, a light file-based database engine, the default session handler. Even with all file locking turned off, this is at least 4 times slower than the current system used by PHP 4. Of course you can change this setting back to flat session files, but the fact this is their default should say something about other decisions they've made. This setting itself makes especially no sense to me, as all session variables go into the $_SESSION superglobal as associative array keys - there is absolutely no benefit to using a database-enabled flat file for this, as opposed to a regular flat file. It's as if the PHP group were excited about sqlite and tried shoving it into everything.
Just read the changelog very carefully. If you're already using PHP, and have gone deeper than casual use, your applications *will* break - especially if you turn on PHP's strict mode which kills backwards compatibility with PHP 4.
Re:the past is the future (Score:2, Informative)
Here's a handy table:
Dynamic/weak: PHP
Dynamic/strong: LISP
Static/weak: C
Static/strong: Haskell
Re:the past is the future (Score:2, Informative)
Strongly typed - the identifier is typed
Dynamicly typed - the data (object) is typed
Weakly typed - the operations on the data are typed
PHP and Unicode (Score:3, Informative)
The reason is that PHP's biggest strength is that these days, you can get a PHP-enabled host for virtually no money. However, most of these installs run a standard PHP, some even a locked down one.
The consequence is that anyone who wants to develop PHP software for a large audience cannot use any non-standard stuff (except
I don't see why they won't do native Unicode, when Perl, Python, Java and all the other popular web languages support Unicode with all the bells and whistles.
Re:Why Perl is still the Regex king (Score:1, Informative)
Re:I hate to say it.... (Score:3, Informative)
2) If the old language does what they want, why upgrade. It's *Personal* Home Page, after all, not corporate homepage.
3) Why make things more complex, for very little benifit.
You forgot:
4) Because it works.
I've been the admin for Apache/PHP servers for close to 6 years now and I've not ever had PHP cause a single crash. You can have complete idiots writing PHP scripts and you don't have to worry about them taking down you're entire server with a bad piece of code.
The truth of the matter is that people like me don't care which side of the OO fence PHP is on, we just want something that works and we don't want to get phone calls on our off hours about something crashing. PHP is a solid solution for that.
Re:Yahoo Store, of course, is in LISP (Score:1, Informative)
I can't believe you got a +4, Informative for a completely inaccurate comment. Congratulations.
Re:Why Perl is still the Regex king (Score:5, Informative)
Re:How do they know it uses Bigloo Scheme? (Score:2, Informative)
/usr/bin/bigloo
/usr/lib/bigloo
/usr/li
/usr/lib/bigloo/2.6c/bigloo.h
/usr
/usr/lib/bigloo/2.6c
<snip>
/usr/lib/libbigloo_s-2.6
/usr/lib/libbigloo_u-2.6c.so
/usr/lib/libbi
/usr/lib/libbigloofth_u-2.6c.so
/usr/lib/libbigloog c_fth-2.6c.so
No it wasn't... (Score:3, Informative)
wrong (Score:5, Informative)
i've been using php5 since the first beta and afaik it has never required overloaded child methods to require the same number of arguments as the parent class.
<?
error_reporting(E_ALL|E_STRICT);
class SomeParent
{
function __construct($var1, $var2)
{
echo "Parent: $var1, $var2\n";
}
}
class SomeChild extends SomeParent
{
function __construct($var1,$var2,$var3)
{
echo "Child: $var1, $var2, $var3\n";
}
}
$x = new SomeParent(1,2);
$y = new SomeChild(3,4,5);
$z = new SomeParent(6,7,8);
Parent: 1, 2
Child: 3, 4, 5
Parent: 6, 7
*/
?>
as for sqlite as session handler, it is not the default, nor has it ever been the default.
there was a patch to ALLOW it to be used as a session handler, by setting session.save_handler = sqlite in php.ini
but if we look at the php.inis in the php5 distribution:
[solidox@server150 php-5.0.0]$ cat php.ini-*|grep "session.save_handler"
session.save_handler = files
session.save_handler = files
both dist and recommended use flat files as the default session handler.
Re:Perl2Exe, PAR... Perl rocks.. (Score:3, Informative)
Those are not compilers, they just bundle the interpreter and needed libraries into package.