News Feed
Jobs Feed
Sections




News Archive
feed this:

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

Evert Pot:
PHP 5.5.10 timezone handling changes
March 31, 2014 @ 12:29:27

Evert Pot has a new post sharing some of the changes in DateTime handling that he's updated in the latest release in the PHP 5.5.x series.

PHP 5.5.10 got released a few weeks ago, and among other things, it added some new functionality related to timezone handling. In short, [subtracting from UTC] now works. Normally this would not be recommended, as you really should specify timezones based on their geographical location. This information is not always available though, so it's a welcome new feature.

Other changes include the removal of the automatic translation from "UTC" to "GMT" as well as errors being thrown when one of the "odd" timezones are used (he provides the list). Additionally, an update around timezone "guessing" has been added and the fallback that was in place has been removed.

0 comments voice your opinion now!
timezone change datetime utc gmt error names

Link: http://evertpot.com/php-5-5-10-timezone-changes/

QaFoo Blog:
Tracking Changes in PHP Projects
November 20, 2013 @ 11:27:26

The QaFoo team has made available a tool they've created to track changes in PHP projects, the QaFoo Changetrack tool.

Since quite some time I've talked to people about the idea for a tool that tracks changes in the classes and methods of your PHP project in order to detect which entities are changed most frequently, which are often affected bugs and other statistics. After some hacking, we are now making it available on Github.

The tool includes a few commands including one that analyzes the project you point it at (and makes an XML defining its changesets) and another that provides a report of how often a certain method is involved in a change. The post includes an example using the Twig Github repository noting that, because of the analysis being done on each checkout, can take quite a while depending on the age of the project.

0 comments voice your opinion now!
track project change qafoo changetrack github

Link: http://qafoo.com/blog/061_tracking_changes_in_php_projects.html

SitePoint PHP Blog:
A PHP from the Future
August 20, 2013 @ 11:27:12

On the SitePoint PHP blog Timothy Boronczyk has a new post trying to predict the future of PHP and where the language might be heading:

As developers, we find ourselves living in exciting times. With increasing attention paid to online activities, we're working with larger data sets (even "big data"); scalability and connectivity are more important than ever before; the very nature of privacy is being re-examined. But quietly, in the shadow of all of this, sits perhaps a more pragmatic question. How will PHP change and grow to enable us to build the future, whatever it may hold?

Among the things he proposes are ideas about future versions with double-digit minor release numbers, less frameworks and more meta-frameworks, the introduction of lots of new extensions and the adaptation and positive outlook for a thriving, constantly improving web-centric language.

0 comments voice your opinion now!
future language opinion change grow evolve

Link: http://www.sitepoint.com/a-php-from-the-future

Reddit.com:
What would you change about PHP if you could dictate the next major version?
July 24, 2013 @ 12:46:54

In Reddit.com there's a great discussion all started by a simple question - What would you change about PHP if you could dictate the next major version?

We know that PHP has flaws, though it's the best language for web programming, at least in my opinion. How would you improve it?

There's tons of answers (some valid, some are just trolls coming out to play), here's just a few:

  • Named parameters
  • Add scalar type hinting
  • True multi-threading support
  • Property accessors
  • Strings as objects
  • A native namespace
  • Return typing
  • Default autoloading

There's lots of discussion around some of these (and plenty of others not even mentioned) so be sure to check out the full post for more great ideas.

0 comments voice your opinion now!
version change discussion idea version opinion

Link: http://www.reddit.com/r/PHP/comments/1iw0cj/what_would_you_change_about_php_if_you_could

Matt Frost:
Agent of Change Part 2 Presentation
February 05, 2013 @ 09:20:35

Following up on his previous post about being an "agent of change" in your organization (work, open source project, etc) Matt Frost has posted his second part of the series focusing on the presentation of your ideas.

In Part 2 we're going to talk about presentation of the pitch you put together for this change. It's important that your pitch be well researched and in some regards provable, as the Agent of Change the responsibility lies with you to prove the value of your idea. As we touched on in Part 1, a well thought out plan is going to go a long way in breaking down the barriers that make change difficult to take hold.

He makes a strong point that you need to identify the problem you're trying to solve (and what solution you're wanting to propose) clearly before trying to present it to a listening audience. He recommends quantifying your solution in terms everyone can understand like "hours of work" or cost. He recommends coming up with a short "elevator pitch" version to entice and the longer version to fill in the gaps.

You've got slides, documentation, statistics and loads of other good information that is going to benefit your development process, sales people in particular are looking for that jewel that helps set your organization apart; you've got that jewel!
0 comments voice your opinion now!
agent change series practices development presentation


NetTuts.com:
How to Write Code That Embraces Change
February 04, 2013 @ 13:18:58

On NetTuts.com today there's a great new article about how to write code that embraces change and can be easily updated and reconfigured due to a decoupled nature and use of good OOP concepts.

Writing code, which is easy to change is the Holy Grail of programming. Welcome to programming nirvana! But things are much more difficult in reality: source code is difficult to understand, dependencies point in countless directions, coupling is annoying, and you soon feel the heat of programming hell. In this tutorial, we will discuss a few principles, techniques and ideas that will help you write code that is easy to change.

He covers some of the good OOP principles to think about when developing - like cohesion, orthogonality and coupling (via class methods, polymorphism, dependency injection or interfaces). He spends some time looking at the SOLID development principles and how you can implement each of them in some sample code. He also talks some about high level design and how the separation of concerns can help make your code easier to maintain and change.

0 comments voice your opinion now!
tutorial code change oop decouple dependency solid principles


Matt Frost:
Agent of Change Part 1 Preparation
January 08, 2013 @ 09:57:35

Matt Frost has posted the first part of a series he's writing up about being an "Agent of Change" in your development organization with recommendations on how you can make changes for the better happen. In this first article, he looks at working up "the pitch" for new technology and practices.

We all to make changes that make our jobs easier, so if your change isn't meeting a need or helping to ease a pain point, it's probably not the right change. [...] Find something that makes your job harder or less enjoyable, there's a pretty good chance that you aren't the only one.

He recommends doing plenty of research before making your recommendations, especially if it's a "we should be doing, but don't know how to" kind of improvement. He uses test-driven development in his examples, with part of his pitch being that it reduces the number of bugs that make it into production.

When plans are well thought-out and researched, the element of risk that others perceive tends to dwindle. [...] It's not about pointing out the faults of others in the organization or assigning blame, it's about learning and making positive changes from the lessons you've learned.
0 comments voice your opinion now!
agent change preparation series practices development


Community News:
CakePHP 2.0 Released (with some Major Changes)
October 21, 2011 @ 11:03:05

The Bakery (a CakePHP site) has announced the release of CakePHP 2.0, a major shift in the framework with some very large changes to bring it up to the level of other full-stack frameworks currently offered for PHP.

The CakePHP core team is very exited to announce a major jump in the version numbering. CakePHP 2.0 stable is out! we have put endless hours into this release and great ideas have made it into the the framework for this version. [...] The overall CakePHP ecosystem has also been improved. [...] A huge thanks to all involved in terms of both contributions through commits, tickets, documentation edits, and otherwise contribute to the framework. Without you there would be no CakePHP.

Some huge changes have happened in this release including:

  • Dropping PHP4 support
  • Use of more native PHP functions
  • PSR-0 compliance
  • Object injection for libraries/components/helpers/etc
  • Console tools completely rebuilt
  • A move to PHPUnit tests (away from SimpleUnit)
  • HTML support in form helpers
  • Lazy-loading on just about everything making the overall experience faster
  • Several new plugins like: DebugKit, Datasources, MongoDb, Migrations and AclExtras

They've created a few resources to help you get started with this new version including a new version of the book, a screencast and a migration guide.

1 comment voice your opinion now!
cakephp v2 release major change


rooJSolutions Blog:
Watch-out PHP 5.3.7+ is about.. and the is_a() / __autoload() mess.
September 02, 2011 @ 10:43:24

New from the rooJSolutions blog there's a post pointing out an issue that PHP 5.3.7 has broken the is_a functionality in a lot of cases. The post talks some about what's broken and how you can work around it if you're effected.

The key issue was that 5.3.7 accidentally broke is_a() for a reasonably large number of users. Unfortunately the fixup release 5.3.8 did not address this 'mistake', and after a rather fruitless exchange I gave up trying to persuade the group (most people on mailing list), that reverting the change was rather critical (at least pierre supported reverting it in the 5.3.* series).

This new issue was causing some strange errors to pop up in his code because of a parameter type change in the is_a call, updating the first parameter to be an object instead of a class name. The is_a() call sends its requests to __autoload in some cases and the string->object mismatch of those parameters causes errors to be thrown. His workaround is, in your checking, just be sure to call an is_object first before passing things off to be is_a() checked and autoloaded.

0 comments voice your opinion now!
bug isa autoload parameter change string object


Sameer Borate's Blog:
Checking your site for malicious changes
August 09, 2011 @ 10:04:25

Sameer Borate, in the wake of having security issues with his site, has posted a hint you could use to help detect when something has changed in important files in your application by checking their hash.

Today a couple of hours back my site got compromised. Not much changes to the code, but the .htacces was changed and some code [...] was added to the .htaccess file, which redirected the traffic coming from search engines to a malware site. It has now been removed and to prevent any such changes to the .htaccess file in the future, I've written a small php script that compares the hash (SHA1) of the two major files that usually get compromised and compare them to the one originally stored.

It's not a preventative measure by any means, but it can help you keep track of if something's changed. Several issues have popped up in the major blogging engines that allow for changes to be made directly to files. These changes result in the sha hash to be different and can be used to trigger a security alert. His sample code shows a basic call to mail an alert, but it could be as complex as you'd like (possibly even logging to a database or the like).

0 comments voice your opinion now!
malicious change sha1 hash sha1file check alert security



Community Events











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


podcast security release introduction performance package opinion hack symfony2 composer language component application overview install database framework facebook hhvm unittest

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