Live data from Hacker News

PHP Hacking aka trying to push PHP internals forwards

xarg.org

31–40 of 62 posts

Re: PHP Hacking aka trying to push PHP internals forwards

#31

Boo, deleted short tags. Why do people hate short tags again? I can't remember because <? is not valid XML so there shouldn't be any problems with mixing php and xml... hmm... I wonder ....

<?= always exists as of PHP 5.4, despite the short tags setting.

Awesome. I remember arguing for it on the mailing lists and I'm extremely happy they did this.

With echo tag you can have a very simple and powerful templating system written in the language itself. (I usually just use two methods, Temaplte::show and Template::get, which both are less than 20 lines long.)

Re: PHP Hacking aka trying to push PHP internals forwards

#32

Boo, deleted short tags. Why do people hate short tags again? I can't remember because <? is not valid XML so there shouldn't be any problems with mixing php and xml... hmm... I wonder ....

http://www.javacommerce.com/displaypage.jsp?name=pi.sql&... So when someone uses more boilerplate to avoid conflict with 0.02% of the use cases where there's a problem is something to be proud of.

Can we please give up this ``is-valid-XML'' argument already?

Quick counter-example:

  ' ?>
Guess what:

- if interpreted as XML, the processing instruction ends at the first ?>

- if interpreted as PHP, the PHP code ends at the sencond ?>

...which makes the argument against short tags -- XML validity -- moot. Can't be fixed without breaking backward compatibility either. Let's drop the argument now; otherwise somebody well-meaning will try to apply it and will end up breaking backward-compatibility (and removing a neat feature) yet keeping XML-compatibility broken anyway. Just like Robert Eisele did.

Re: PHP Hacking aka trying to push PHP internals forwards

#34

I wonder if it wouldn't have been better to import the PHP source-tree first, then apply each patch one at a time/in a batch. That way applying these patches at a later date would have been easier.

That's what was done.

https://github.com/infusion/PHP/commit/790d551ac9ef8e204b44f...

Re: PHP Hacking aka trying to push PHP internals forwards

#35
post #34

I wonder if it wouldn't have been better to import the PHP source-tree first, then apply each patch one at a time/in a batch. That way applying these patches at a later date would have been easier.

That's what was done. https://github.com/infusion/PHP/commit/790d551ac9ef8e204b44f...

Why oh why didn't he fork php/php-src, make a branch for his changes, then commit as he went along? This just ends up as a big patchbomb. They're never going to merge his changes, and I don't blame them.

EDIT - Hopefully we can straighten this around: https://github.com/infusion/PHP/commit/790d551ac9ef8e204b44f...

Re: PHP Hacking aka trying to push PHP internals forwards

#36
post #34

I wonder if it wouldn't have been better to import the PHP source-tree first, then apply each patch one at a time/in a batch. That way applying these patches at a later date would have been easier.

That's what was done. https://github.com/infusion/PHP/commit/790d551ac9ef8e204b44f...

No it wasn't. As sc68cal says, its a patchbomb. And if you think otherwise, let me know how I can revert his changes to remove short tags and the mysql* changes using a single git command (hint, there isn't).

I'm all for changes to an open source project - whether it acts like one or not - but every open source developer should, at some point, learn that gigantic patchsets with lots of unrelated changes are a big no-no.

Re: PHP Hacking aka trying to push PHP internals forwards

#38
post #34

Earlier quoted context omitted.

That's what was done. https://github.com/infusion/PHP/commit/790d551ac9ef8e204b44f...

No it wasn't. As sc68cal says, its a patchbomb. And if you think otherwise, let me know how I can revert his changes to remove short tags and the mysql* changes using a single git command (hint, there isn't). I'm all for changes to an open source project - whether it acts like one or not - but every open source developer should, at some point, learn that gigantic patchsets with lots of unrelated changes are a big no-…

I'm just pissed that he didn't even bother to actually fork the project. On Github! WOW! All the previous commits before the fork? Gone. Poof. It's completely without any context. Even though there's a big "FORK" button!

Re: PHP Hacking aka trying to push PHP internals forwards

#39
post #34

Earlier quoted context omitted.

That's what was done. https://github.com/infusion/PHP/commit/790d551ac9ef8e204b44f...

No it wasn't. As sc68cal says, its a patchbomb. And if you think otherwise, let me know how I can revert his changes to remove short tags and the mysql* changes using a single git command (hint, there isn't). I'm all for changes to an open source project - whether it acts like one or not - but every open source developer should, at some point, learn that gigantic patchsets with lots of unrelated changes are a big no-…

Well I wasn't sure what you meant by in a batch. I agree that it wasn't well done, but I wasn't commenting on that.

It's especially interesting considering he says this in the comments:

...I don't want to leave it as a stand alone project. I modified PHP as proof of concept in order to get these changes into one of the next releases.

Post reply on HN