News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Mastering Composer - Tips and Tricks
May 26, 2015 @ 11:02:32

The SitePoint PHP blog has a new tutorial today from editor Bruno Skvorc with some tips and tricks to help you master Composer, the widely popular PHP package management tool.

Composer has revolutionized package management in PHP. It upped the reusability game and helped PHP developers all over the world generate framework agnostic, fully shareable code. But few people ever go beyond the basics, so this post will cover some useful tips and tricks.

Tips in his list include:

  • Installing Composer globally
  • Using "composer require" to install packages
  • Committing your composer.lock file
  • Options to provide profiling information
  • Speeding up Composer installations

...and many more. If you're looking to take your Composer usage and knowledge beyond the basics, definitely check out this article.

0 comments voice your opinion now!
master composer tips tricks advanced list

Link: http://www.sitepoint.com/mastering-composer-tips-tricks/

NetTuts.com:
E-mail List Alternatives With PHP Using Mailgun's List API
May 25, 2015 @ 08:12:15

In a new tutorial posted to the NetTuts.com site they show you an alternative method for sending emails from your PHP application: using the Mailgun API. This API provides an interface into the Mailgun service, specifically made for sending emails without the hassles of hosting your own email server.

Over the past couple years I've run into various frustrations with both open source email list applications and paid cloud-based providers. In this tutorial, I'll guide you through my adoption of Mailgun.com, an economical solution I've been using successfully now for two years. [...] Mailgun is a cloud-based SaaS email cannon, like SendGrid. It's actually free for up to 10,000 emails per month. Mailgun is incredibly powerful and offers a well-documented API in a variety of popular languages. It provides for both send and receive capabilities, the latter of which can be quite difficult to develop from scratch. While Mailgun doesn't provide templates for rich HTML newsletters, it provides a platform upon which you can build anything.

He shows you how to use the service using a simple "ListApp" application (found on GitHub here) that provides some of the most common email list management functionality. He shows you how to set up a free Mailgun account and where to find their PHP SDK for the PHP integration. He then gets into the code examples, showing how to connect to the API via the SDK and doing tasks such as:

  • Creating and update a mailing list
  • Importing members to a list
  • Showing a list of current list subscribers
  • Send a new message
  • Synchronizing lists and members

He ends the post with a quick section about extending the ListApp application (or the PHP SDK) with a suggestion to add better error reporting or a queue system to manage the remote API requests more efficiently.

0 comments voice your opinion now!
tutorial email list alternative mailgun api sdk listapp github

Link: http://code.tutsplus.com/tutorials/e-mail-list-alternatives-with-php-using-mailguns-list-api--cms-22824

Anthony Ferrara:
Tries and Lexers
May 18, 2015 @ 09:47:32

Anthony Ferrara has an interesting new post to his site talking about tries and lexers, two pieces of a puzzle that are used during script execution. In this case, he's tried his hand at writing a parser which, naturally, lead to needing a lexer.

Lately I have been playing around with a few experimental projects. The current one started when I tried to make a templating engine. Not just an ordinary one, but one that understood the context of a variable so it could encode/escape it properly. [...] So, while working on the templating engine, I needed to build a parser. Well, actually, I needed to build 4 parsers. [...] I decided to hand write this dual-mode parser. It went a lot easier than I expected. In a few hours, I had the prototype built which could fully parse Twig-style syntax (or a subset of it) including a more-or-less standards-compliant HTML parser. [...] But I ran into a problem. I didn't have a lexer...

He starts with a brief description of what a lexer is and provides a simple example of an expression and how it would be parsed into its tokens. He then talks about the trie, a method for "walking" the input and representing the results in a tree structure. He shows a simple implementation of it in PHP, iterating over a set of tokens and the array results it produces. He then takes this and expands it out a bit into a "lex" function that iterates over the string and compiles the found tokens.

From there he comes back to the subject of Javascript, pointing out that it's a lot looser than PHP in how it even just allows numbers to be defined. His testing showed a major issue though - memory consumption. He found that a regular expression method consumed too much and tried compiling out to classes instead (and found it much faster once the process was going).

0 comments voice your opinion now!
lexer parser example javascript tries tree data structure

Link: http://blog.ircmaxell.com/2015/05/tries-and-lexers.html

Sahand Saba:
9 Anti-Patterns Every Programmer Should Be Aware Of
May 13, 2015 @ 11:29:50

In a recent post to his site Sahand Saba has posted a list of nine anti-patterns every programmer should avoid. This list isn't language specific and ranges in types of advice from general programming practices down to more specific "code smells" to avoid. The code examples are in Python but you can interpolate them into the world of PHP pretty easily.

A healthy dose of self-criticism is fundamental to professional and personal growth. When it comes to programming, this sense of self-criticism requires the ability to detect unproductive or counter-productive patterns in designs, code, processes, and behaviour. This is why a knowledge of anti-patterns is very useful for any programmer. This article is a discussion of anti-patterns that I have found to be recurring, ordered roughly based on how often I have come across them, and how long it took to undo the damage they caused.

The list of nine includes things like:

  • Premature Optimization
  • God Class
  • Inner-platform Effect
  • Management by Numbers

Each item on the list includes a few subheadings talking about what it is, why it's bad, how to avoid it and some code examples (where appropriate) to find it in your code.

0 comments voice your opinion now!
antipatterns nine list programmer avoid opinion

Link: http://sahandsaba.com/nine-anti-patterns-every-programmer-should-be-aware-of-with-examples.html

ServerGrove Blog:
Useful Linux command-line tools to work with PHP projects
April 24, 2015 @ 11:16:20

The ServerGrove blog has posted a new tutorial with a selection of useful command line tools to help you in working with your PHP applications. None of them are PHP specific but are Unix-based commands that can help in every day development.

Linux provides a lot of interesting command-line tools that we can use when working with PHP projects. In this post we give you some useful commands.

They include examples of commands that can help with:

  • Find all PHP files in the current directory
  • Check the syntax of all PHP files in the current directory
  • Get the size of each Composer dependency
  • Find suspicious PHP files
  • Find files with abstract classes
  • List PHP settings for the xdebug extension
  • Find empty files and/or directories
  • List files currently open by a PHP process

As mentioned, most of the tools themselves are not PHP specific but these example commands do relate to things that are more in a PHP context.

0 comments voice your opinion now!
useful linux commandline tool context example list

Link: http://blog.servergrove.com/2015/04/23/useful-linux-command-line-tools-work-php-projects/

NetTuts.com:
How the Directory Structure Has Changed in Laravel 5
April 16, 2015 @ 09:47:47

On the NetTuts.com site today they have a new tutorial (screencast) posted showing what the changes are in the directory structure of Laravel 5.

The newest version of Laravel was released in February, and the most noticeable change in version 5 is the new directory structure. In this short video tutorial, I'll explain exactly what's changed and why.

The video is a part of a larger series and is one of two free videos for it. The remainder of the series covers things like middleware, contracts, events, forms and validation as well as the command bus and its use.

0 comments voice your opinion now!
laravel5 screencast directory structure change tutorial series

Link: http://code.tutsplus.com/articles/how-the-directory-structure-has-changed-in-laravel-5--cms-23795

Engine Yard Blog:
What to Expect When You're Expecting PHP 7, Part 2
April 08, 2015 @ 11:07:08

The Engine Yard blog has posted the second part of Davey Shafik's "What to Expect with You're Expecting: PHP7" series. In this new post he gets into the details of a few more of the upcoming PHP7 features including generator improvements and engine exceptions.

As you probably already know, PHP 7 is a thing, and it's coming this year! Which makes this as good a time as any to go over what's new and improved. In the first part of this series, we looked at the some of the most important inconsistency fixes coming up in PHP 7 as well as two of the biggest new features. In this post, we take a look another six big features to land in PHP 7 that you'll want to know about.

The features he talks about this time are:

  • Unicode Codepoint Escape Syntax
  • Null Coalesce Operator
  • Bind Closure on Call
  • Group Use Declarations
  • Generator return expressions and delegation
  • Engine Exceptions

He also includes three things you can do to help/get prepared for this upcoming release including testing your code on a PHP7 VM or help out with writing tests and documentation for PHP and its extensions.

0 comments voice your opinion now!
engineyard php7 feature list major unicode coalesceoperator bindclosure groupuse generator engineexception

Link: https://blog.engineyard.com/2015/what-to-expect-php-7-2

Developer Drive:
40+ tools for writing better PHP
April 01, 2015 @ 10:56:43

The Developer Drive site has posted their top 40+ list of libraries and tools that can help developers write better PHP. Their selections range from templating libraries to request handling and even testing tools.

There are scads of PHP tools available over the internet for php developers, but finding an appropriate PHP tool is quite an arduous task and demands effort and time. Today we've collected 45 handy PHP development tools for developers.

Included in their list are tools such as:

Several of the libraries can be installed via Composer (another tool in their list) but other items are stand-alone software that would need to be set up outside of the application.

0 comments voice your opinion now!
tools list top40 libraries software testing template framework ide server

Link: http://www.developerdrive.com/2015/03/40-tools-for-writing-better-php/

Zend:
5 Things You Must Know about PHP 7
March 27, 2015 @ 11:07:39

There's been a lot of talk in the community about PHP 7 and what features will be included but there's been a *lot* of it. To help distill it down a bit Zend has posted this infographic of the Top 5 features that will be coming in this next major version.

Their top five list includes both the main points and a quick summary for:

  • When it comes out (hint: this year)
  • The spaceship operator
  • Return type declarations and scalar type hints
  • Performance improvements

...and #5, even more performance improvements. There's also some links to other information about some of the topics to provide even more detail for those wanting to dive in.

0 comments voice your opinion now!
php7 infographic top5 list release spaceship returntype scalartypehint performance

Link: https://pages.zend.com/TY-Infographic.html

SitePoint PHP Blog:
Top 10 Z-Ray Features to Check Out
March 26, 2015 @ 09:50:23

The SitePoint PHP blog has a new post today from Daniel Berman (of Zend) with the top 10 features of Z-Ray to be sure to check out. Disclaimer: Z-Ray is a tool provided by Zend, a part of their Zend Server product.

Necessity is the mother of invention goes the famous saying. For PHP developers, there is no greater need than visibility. But developers today have a tough choice to make as they develop and debug their apps. Either use crude methods such as printing, debugging information, or storing it in a log file, or - use multiple debugging/profiling tools that are awkward and require a lot of work from the developer's side. [...] This article introduces the top 10 features of Z-Ray - an innovative new technology from Zend that makes PHP development a whole lot quicker and easier by giving developers unprecedented insight into their code - and the visibility they need to develop top-notch apps.

Among the items on their Top 10 list are things like:

  • Viewing information about page requests
  • Execution time and memory consumption
  • Showing errors and warnings
  • Viewing functions called during execution
  • Debugging features for mobile apps and APIs

Check out the full post for a list of more features and screenshots/detail on each one.

0 comments voice your opinion now!
zend zray zendserver top10 list features screenshot

Link: http://www.sitepoint.com/top-10-z-ray-features-check/


Community Events

Don't see your event here?
Let us know!


framework series interview release conference part2 community example opinion podcast symfony2 application laravel configure introduction voicesoftheelephpant api performance php7 language

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework