Let’s have a bit of fun. A while ago, I experimented with PHP macros, adding Python range syntax. Then, the talented SaraMG mentioned an RFC, and LordKabelo suggested instead adding C#-style getters and setters to PHP. Aware of how painfully slow it can be for an outsider to suggest and implement a new language feature, I took to my editor… The code for this tutorial can be found on Github. It’s b
The PHP Framework Interoperability Group (PHP-FIG, or just FIG for short) is at a crossroads. Many electrons have been sacrificed talking about FIG’s tribulations of late, but sadly much of it has been FUD, with little effort spent on the positive. At SitePoint’s invitation, I’d like to offer a more positive outlook on FIG and the PHP community, and demonstrate why FIG can, and should, continue to
In this article, we are going to look at how we can create and use our own custom annotations in a Symfony 3 application. You know annotations right? They are the docblock metadata/configuration we see above classes, methods and properties. You’ve most likely seen them used to declare Controller routes (@Route()) and Doctrine ORM mappings (@ORM()), or even to control access to various classes and
I was originally going to call this “Micro Macros with Márcio’s Perfectly Pragmatic Pre-Processor library”, but I didn’t think Bruno would approve… I get really excited when developers feel empowered to create new tools, and even new languages with which to solve their problems. You see, many developers come to PHP from other languages. And many PHP developers can code in more than one language. O
If there is one thing the world needs, it’s definitely another PHP template engine! But wait, this one is different! Many PHP template engines (Smarty, Blade, Twig…) are little more than abstracted PHP code, making it easier to write loops, if/then/else blocks, and display variables with less verbosity than vanilla PHP. These traditional template engines require the designer to have an understandi
Previously, we looked at some common caching mechanisms we can easily utilize to make our apps faster. In this part, we’ll walk through some of the additional software that we can use with PHP for caching. Memcached Memcached is an in-memory key-value store. You can use it to store things like strings, numeric values, objects and arrays. Installing Memcached You can execute the command below to in
Ever thought of writing code responsible for generating certain PHP classes, methods, properties automatically? Read on to get the details on when exactly automatic code generation may be helpful and – what’s most important – how to implement it properly using the Memio library. The Concept The basic idea is quite simple. You write code which will create other parts of the code, functions, variabl
Laravel, again, taking the lead in all, with Symfony usually following closely, except in the curious case of the underaged group – did PHPixie get introduced in a school and get points there? Worth looking into. Nothing really unexpected in these – except that only the youngest and oldest group seem to be “keeping it real” with “No Framework”. It’s also apparent that CodeIgniter, even in its curr
January 16, 2015The PHP 7 Revolution: Return Types and Removed Artifacts With the planned date for PHP 7’s release rapidly approaching, the internals group is hard at work trying to fix our beloved language as much as possible by both removing artifacts and adding some long desired features. There are many RFCs we could study and discuss, but in this post, I’d like to focus on three that grabbed m
On October 28th, 2014, puppies all over the world spontaneously burst into flames – or so the community would have you believe. What happened was the reveal of BowerPHP (I shy from calling anything “alpha” a release), and here’s why it wasn’t anything nearly as apocalyptic as some would have you believe. What? BowerPHP is a PHP version of Bower, the NodeJS based front end package manager. We cover
This article was sponsored by NewRelic. Thank you for supporting the sponsors who make SitePoint possible! A previous version of this article incorrectly stated that PHPNG is JIT. This is not the case, and the necessary amendments have been made. See bottom of article for more info. Chaos in the old world! First HipHop, years ago, and no one bats an eye. Then suddenly, HHVM happens, introduces Hac
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く