11 ms·
PHP 5.5 released and other things PHP related
- inovica 13y agoThis is the latest PHP weekly. With PHP 5.5 just being released today we cover this and other news related to PHP.
- inovica 13y agoOne other thing - Send us announcements, blog posts, news etc and we'll include them
- chaud 13y agoThe SaaS article uses mysql_query() and the top 10 framework post has an annoying Facebook modal and offers very little content. I don't normally look at most of the articles, but the ones I do read are usually decent!
- savio 13y agoThanks for keeping me motivated with the great selection of tutorials.
- rolikoff 13y agoSigned up 2 weeks ago. Keep up the good work
- dutchbrit 13y agoSame here, pretty good advanced in-depth content.
- bratao 13y agoWw also have a modern framework for php. Everyone should try http://laravel.com/ http://laravel.com/ , such a fresh air into php development.
- krapp 13y agoOr at the very least just learn how to use Composer.
- hadem 13y agoAgreed! Framework arguments aside, learn how to use Composer. If you haven't played with namespaces, this is a great way to start learning more about them and using them in your own codebase. It also makes it incredibly easy to work with other packages[1]! [1] https://packagist.org/ https://packagist.org/
- togasystems 13y agoWe just implemented an internal composer repository for sharing code between our different services. I am surprised composer isn't more popular. I have been developing for a long time and have only recently heard of it.
- camus 13y agoSilex is better , i hate all these static classes everywhere. That's the only reason i'm not using Laravel "Core" . Eloquent is nice though.
- diggan 13y agoHmm, every new framework nowadays seems to be based on Symfony2 which appears to be kind of slow. Is there any small (relatively new) PHP framework that isn't based on Symfony2?
- krapp 13y agoprobably not what you're looking for but maybe slim framework? http://www.slimframework.com/ http://www.slimframework.com/
- donutdan4114 13y ago4bytes is crazy fast: https://github.com/donutdan4114/4bytes-framework https://github.com/donutdan4114/4bytes-framework
- ck2 13y agoIf you need a control panel for the nifty new Zend Opcache in PHP 5.5, please steal my ugly hack and improve it: https://gist.github.com/ck-on/4959032 https://gist.github.com/ck-on/4959032
- RossM 13y agoYou should put this into a regular repository so that people can send pull requests.
- twodayslate 13y ago> All gists are git repositories, so they are automatically versioned, forkable and usable as a git repository.
- imperialWicket 13y agoBut they do not (yet?) support pull requests, so you end up with a number of disparate forks.
- astrodust 13y agoOne step closer to launching mysql_query into the sun.
- lhnn 13y agowhy is mysql query bad? as someone who knows sql, I've always loathed over abstracted mechanisms for db calls. its also been a while since I've done web dev.
- unethical_ban 13y agowhy is mysql query bad? as someone who knows sql, I've always loathed over abstracted mechanisms for db calls. its also been a while since I've done web dev.
- krapp 13y agoThe old php mysql_* functions have become notorious for their vulnerability to SQL injection[1]. In no small part because novice developers also have a tendency to build queries directly out of $_GET parameters. While PDO and parameterized queries aren't a silver bullet, simple strings as queries are just a nightmare to do properly.[2] [1] http://stackoverflow.com/questions/60174/how-to-prevent-sql-injection-in-php http://stackoverflow.com/questions/60174/how-to-prevent-sql-... [2] http://www.youtube.com/watch?v=o4dJ7hdA8fs http://www.youtube.com/watch?v=o4dJ7hdA8fs
- lonnyk 13y agoIt's an unmaintained extension that does not support new MySQL functionality. If you don't want any more abstraction you can use the mysqli_* functions instead.
- astrodust 13y agoIf you forget to escape even one bit of supplied user data your entire application, server, or possibly even business can be compromised. You need to be extremely disciplined about escaping if you use this antiquated method. There are automated injection tools that will discover and exploit these, it's not even hard. All you need to do is use a database layer with placeholder values and if you're diligent about encoding everything that way, your chances of being hacked by a simple SQL injection bug are nearly zero. You'll have to make several mistakes before you're in hot water. `mysql_query` is the worst possible interface to MySQL since it's literally the low-level C bindings ported in to PHP without any kind of enhancement. Those functions were intended for writing more abstract interfaces, not being used directly. While it is possible to write mysql_query code correctly, it is very challenging and not worth the time when facilities like PDO exist. Also, if you loathe "over abstracted" database libraries you're probably using the wrong library. A library should make your database interfacing easier, not harder.
- pearjuice 13y ago>open changelog >ctrl+f "PSR" >0 results Into the trash it goes.
- kbenson 13y agoWow, PSR-2 (Coding Style Guide) seems fairly extreme (existentially, not in it's specifics which I haven't looked at) for PHP. Part of me thinks it's odd, considering I never felt all that much freedom to change how I expressed things in PHP (at least not in the slightest compared to Perl). Another part of me thinks that enough amateur programmers use PHP that some style guide may benefit them greatly. Then again, if people don't come to a better style through experience (or at least an explanation of the benefits or what mistakes it helps prevent) then is it really as useful?
- itafroma 13y agoThe purpose of the PSRs is to help support and foster collaboration between members of the Framework Interoperability Group (the people who draft and publish the PSRs: consists of medium-to-large PHP projects including Symfony, Amazon, Drupal, Joomla, etc.). Having a common coding standard makes it much easier to publish code as part of other PSRs as questions like "tabs or spaces?" don't have to get rehashed every time a new PSR is drafted. That's to say PSR-2 is not intended to a be a "best practices" type of thing: it's actually just the result of a survey of member projects at the time with each part chosen because that's what the majority of them did, even if it was just a simple majority or there were member projects were with the majority on, say, tabs vs. spaces but not, say, indentation size. Some of the FIG member projects have adopted it, but several haven't and don't intend to. It's useful if you don't have any other coding standard available, but easily ignored with no loss of interoperability with the other PSRs if you do.
- kbenson 13y agoThanks for the explanation, that makes more sense.
- ceejayoz 13y ago
- iso8859-1 13y agoChangelog here: https://github.com/php/php-src/blob/php-5.5.0/NEWS https://github.com/php/php-src/blob/php-5.5.0/NEWS Highlights: * Opcode cache (https://wiki.php.net/rfc/optimizerplus https://wiki.php.net/rfc/optimizerplus) * Generators and coroutines (https://wiki.php.net/rfc/generators https://wiki.php.net/rfc/generators) * "finally" keyword * Constant array/string dereferencing * Optimized access to temporary and compiled VM variables. 8% less memory reads. * Dropped Windows XP and 2003 support.
- ChikkaChiChi 13y agoI've never used Optimizer+ so I might have to compare it with my nginx/php5-fpm/apc buildouts. I understand compiling bytecode to memory but I still wish there was a way to write files bytecode files back to the disk in a similar fashion to python.