PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information
Displaying news posts 201 to 220 of 6889

Lorna Mitchell: 9 Magic Methods in PHP

Lorna Mitchell: 9 Magic Methods in PHP
Lorna Mitchell has a new post showing nine of the magic methods that are included in PHP by default (like __construct, __get and __set) including a few you may not have used before.The "magic" methods are ones with special names, starting with two underscores, which denote methods which will be triggered in response to particular PHP events. That might sound slightly automagical but actually it's pretty straightforward, we already saw an example of this in the last post, where we used a constructor - so...

Anthony Ferrara: On Templating

Anthony Ferrara: On Templating
In this latest post to his site Anthony Ferrara take a look at templating in web applications - more specifically as it deals with his experience with the Mustache templating engine.I've been playing around with tempting engines a lot lately. For a recent project, I needed the ability to re-use the same template set in both JS and PHP (coupled with the History API, providing seamless dynamic behavior, yet still having raw content pages). Realistically today, there's only one choice for that sort of...

Response: Private Methods Considered Harmful

Response: Private Methods Considered Harmful
Brandon Savage has recently posted two blog posts portraying his opinion that using private visibility on class methods can be considered harmful in a lot of situations. While I understand the point he is trying to make, I can't say that I agree with it. I do like private visibility and think that it's actually under-used in a lot of software. But it's not because I think Brandon is wrong...Read more A

Derick Rethans: Debugging Connections with the MongoDB PHP driver

Derick Rethans: Debugging Connections with the MongoDB PHP driver
Derick Rethans has a new post that the developers out there using MongoDB in their applications will find useful - a look at debugging your connections with the PHP driver (and what kind of information it can provide).In a previous article I already mentioned that the 1.3 version of the MongoDB driver has improved logging functionality to aid with debugging connection issues. I've already briefly introduced MongoClient::getConnections(), but it provides a bit more information than I have already shown....

Community News: Privates - Harmful or Useful? (Discussion)

Community News: Privates - Harmful or Useful? (Discussion)
There's been a few articles posted on various blogs in the PHP community recently about the "most correct" usage of the "private" scope in your PHP applications. As with any feature of just about any language out there, there's people on both sides of the fence. Here's the ones that have weighed in so far: Brandon Savage's initial post (an excerpt from his upcoming "Do This, Not That" book) A response to this from Anthony Ferrara Brandon's own response to comments on his previous article This new post...

In Further Defense Of Avoiding Private Methods

In Further Defense Of Avoiding Private Methods
I do not wholeheartedly believe that private methods are evil, or that they were mistakenly included in the PHP language by the core development team. Nor do I believe that there are only two true options when it comes to devising visibility requirements: public and protected. There is a place for private methods, in PHP [...]

PHPMaster.com: Action Automation with MySQL Triggers

PHPMaster.com: Action Automation with MySQL Triggers
For the MySQL users out there, PHPMaster.com has a new tutorial showing you how to use triggers in your database to perform automatic actions on things like "before update" or "after insert".By making MySQL do more work through triggers, the PHP side of my project was greatly simplified. So, it is the intention of this article to give you some insight into the creation and usage of MySQL triggers, so that by the end of this reading you can make use of them in your own projects.They start by explaining...

Aura: More Decoupled Than Symfony 2 and Zend Framework 2

Aura: More Decoupled Than Symfony 2 and Zend Framework 2
The guys at PHPMagazin have posted a followup question about the Aura Project for PHP. Here is our original English conversation. I'd like to follow up on the last point where we talked about other frameworks. I think that the a Continue reading a'

Community News: Packagist Latest Releases for 12.11.2012

Community News: Packagist Latest Releases for 12.11.2012
Recent releases from the Packagist:campaignmonitor/createsend-php (v2.5.0) bradstinson/assets (0.0.3, 0.0.2) lncd/Oauth2 (0.3.3) aws/aws-sdk-php (2.0.2) avalanche123/imagine-bundle (v2.1.1) dhorrigan/db-wrapper (1.0.1) phpunit/phpunit-selenium (1.2.11) ray/di (1.0.0-beta3) uam/tcpdf (2.0.2, 1.0.0)

Community News: Latest PECL Releases for 12.11.2012

Community News: Latest PECL Releases for 12.11.2012
Latest PECL Releases: stats 1.0.3 tokyo_tyrant 0.7.0 udis86 0.1.0 mongo 1.3.2RC1 mongo 1.3.1

9 Magic Methods in PHP

9 Magic Methods in PHP
This post forms part of a series of articles about using PHP to do objected oriented programming, or OOP. They were originally published elsewhere but are no longer available at that location, so I'm reposting them here. Previously in the series was an introduction to OOP in PHP, in two parts The title is a bit of a red herring as PHP has more than 9 magic methods, but these will get you off to a good start using PHP's magic methods. It might be magic, but no wands are required! The "magic" methods are...

More Code, More Problems

More Code, More Problems
About a year ago, I wrote out some principles for web programming in PHP. I called it the MicroPHP Manifesto. The thing is, what I talked about wasn't really specific to PHP. So, I've decided to explore the concepts again in the context of the other languages I work with. What follows are some principles I try to keep in mind.Learn languages, not frameworksI like PHP, Python, and JavaScript, and I like making things in PHP, Python, and JavaScript. I'm not a Symfony developer, or a Django developer, or a...

Debugging Connections with the MongoDB PHP driver

Debugging Connections with the MongoDB PHP driver
Debugging Connections with the MongoDB PHP driver Tokyo, Japan Tuesday, December 11th 2012, 10:13 JST In a previous article I already mentioned that the 1.3 version of the MongoDB driver has improved logging functionality to aid with debugging connection issues. I've already briefly introduced MongoClient::getConnections(), but it provides a bit more information than I have already shown. The other improvement are changes to the MongoLog class. Mongo::getConnections() Mongo::getConnections()...

On Templating

On Templating
I've been playing around withAtemptingAengines a lot lately. For a recent project, I needed the ability to re-use the same template set in both JS and PHP (coupled with the History API, providing seamless dynamic behavior, yet still having raw content pages). Realistically today, there's only one choice for that sort of requirement: Mustache. I've learned a lot while playing with Mustache, and it's really changed my entire viewpoint on presentation layer construction.Read more A

7PHP.com: Interview with Adam Culp - Organizer of SoFloPHP & the Sunshine PHP Conference

7PHP.com: Interview with Adam Culp - Organizer of SoFloPHP & the Sunshine PHP Conference
On 7PHP.com today they've posted their latest PHP community interview - the answers to their questions with Adam Culp, the organizer of the South Florida PHP User Group and Sunshine PHP Conference.In this edition I talked with Geeky Boy, [Adam Culp @adamculp], who is The Leader and Organizer of The South Florida PHP User Group (aka @SoFloPHP) and the organizer of the hot and buzz-ling SunShinePHP Conference for developers. @SunShinePHP will be held in Miami / Florida in feb 2013 and is promising a...

David Müller: Cross Domain AJAX Guide

David Müller: Cross Domain AJAX Guide
In his latest post David Müller covers some of the things to consider when working with cross-domain ajax requests including CORS and iframes.As it is widely known, AJAX Requests are only possible if port, protocol and domain of sender and receiver are equal. [...] Having this cleared out, we will cover ways around this restriction.He covers three main approaches to allowing these cross-domain requests (and some of the security implications that can come with them): CORS (Cross Origin Resource Sharing)...

Brandon Savage: Private Methods Considered Harmful ("Do This, Not That" Excerpt)

Brandon Savage: Private Methods Considered Harmful ("Do This, Not That" Excerpt)
A while back Brandon Savage mentioned a book he was writing ("Do This, Not That") to help PHP developers learn some of the best practices associated with the language. Today he's posted an excerpt from the book for your enjoyment.This great series of highly focused e-books will offer tips, tricks and best practices focused on core areas of PHP development, including databases, security, filtering, regular expressions, configuration and more. Since it will be a series of tightly targeted solutions,...

PHPClasses.org: Lately in PHP, Episode 30 - Will PHP 6 feature a JIT compiler?

PHPClasses.org: Lately in PHP, Episode 30 - Will PHP 6 feature a JIT compiler?
On the PHPClasses.org site they've posted the latest episode of their "Lately in PHP" podcast series - Episode #30, "Will PHP6 Feature a JIT compiler?"Now that Facebook made some progress with their PHP HipHop VM JIT compiler engine, some PHP core developers are considering having also a JIT compiler implementation of the official implementation based on LLVM, eventually in PHP 6. [...] They also commented on the first alpha release of PHP 5.5.0, proposals for having pure interfaces in the PHP core, the...

PHPMaster.com: Inversion of Control - The Hollywood Principle

PHPMaster.com: Inversion of Control - The Hollywood Principle
In this new tutorial on PHPMaster.com, Alejandro Gervasio looks at the Inversion of Control methodology and how it's more than just an abstract reference to dependency injection.Traditionally, application components have been designed to operate on and control the execution environment, an approach that delivers well to some extent. [...] Instead of making the module completely responsible for logging data to multiple endpoints, we can transfer the responsibility straight to the external environment....

Community News: Packagist Latest Releases for 12.10.2012

Community News: Packagist Latest Releases for 12.10.2012
Recent releases from the Packagist:guzzle/guzzle (v3.0.6) zumba/symbiosis (v1.1.5) vojtech-dobes/nette-forms-inputlist (1.0.0) pascalc/tinyl10n (0.6) symfony-cmf/routing-extra-bundle (1.0.0-alpha2) symfony-cmf/routing (1.0.0-alpha3) ladela/personal-translations-widget-bundle (v0.2.2, v0.2.1, v0.2) manymules/marionettejs-bundle (1.0.0-rc1) cloudlib/Cloudlib (0.3.0) cloudlib/core (0.3.0) slim/sessions (0.1.0) netpositive/discriminatormap-bundle (v2.0.1)

Latest PHP Tweets