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

Medium.com:
PHP7 More strict! (but only if you want it to be)
March 18, 2015 @ 10:48:38

In this new article Er Galvao Abbott talks about the struggle (and finally, inclusion) of type hinting in PHP, more specifically coming in PHP7, and how strict they can be.

It wasn't easy (we knew it wouldn't be) and certainly wasn't pretty (we sort of knew that as well), but it's finally official: PHP7 will come with Scalar Type Hints (STH) and an optional "strict mode". [...] This is basically a step towards a more strict way of coding in PHP. Will we see more steps in that direction in the future? We don't know and we're OK with that for now. What's brilliant about the body of work represented by these RFCs is that by implementing their concepts and specially making the "strict mode" optional the choice of being more strict remains with the programmer.

He talks some about the background of the want and need for strict typing in PHP and mentions three RFCs that will influence the type hints and handling in PHP7:

He summarizes each RFC and what it contributes to the language. He ends the post by dispelling one thing about all of this new typing functionality - PHP will remain loosely typed, this new functionality is in a "strict mode" only used when specified.

0 comments voice your opinion now!
php7 strict type hint mode rfc introduction feature

Link: https://medium.com/@galvao/php7-more-strict-but-only-if-you-want-it-to-be-78d6690f2090

NetTuts.com:
When You're Hacked in WordPress Staying Safe Later On
February 20, 2015 @ 14:19:00

NetTuts.com has posted the second part in their "When You're Hacked - WordPress" tutorial series today with this new article showing you how to stay safe once you've recovered from the initial attack.

n the first part of this series, we went through what to do when your website gets hacked. In this second part, we're going to learn about staying safe and being able to act quickly when another unpleasant incident happens.

They start by answering the overarching question everyone wants to know about WordPress (as it relates to security) - "is it safe?" They follow this with some recommendations to help keep your install safe including:

  • Staying Up to Date
  • Using Safe Plugins & Themes
  • Using a Security-Related WordPress Plugin

Check out the rest of the article for the full list and a quick summary of each, some with links to the actual tools and plugins to help you protect your installation.

0 comments voice your opinion now!
wordpress hack stay safe tutorial series part2 recommendation

Link: http://code.tutsplus.com/tutorials/when-youre-hacked-in-wordpress-staying-safe-later-on--cms-22748

Sameer Borate:
Calculating descriptive statistics in MySQL
April 08, 2014 @ 10:46:22

Sameer Borate has shared some examples of how to generate some meaningful statistics about the contents of your database in a new post to his site today.

Descriptive statistics can be quite useful for simple analysis of records in a database. For example, to calculate average numbers of sales or products for a particular duration, or the Variance of sales for a month etc. We can easily calculate standard descriptive statistic measures in MySQL such as MEAN, SUM, STANDARD DEVIATION, VARIANCE, MIN and MAX using built-in functions.

He includes both the SQL and a bit of PHP code showing how to get these statistics (based on a simple data set of student scores). The PHP is required to more correctly evaluate the median and mode values as it's easier to evaluate those in PHP.

0 comments voice your opinion now!
mysql database descriptive statistics mean sum mode median

Link: http://www.codediesel.com/data/calculating-descriptive-statistics-in-mysql

Rob Allen:
Implementing a ZF2 development mode
January 02, 2014 @ 09:18:07

Rob Allen has shared a method he's found for implementing a Zend Framework v2 in development mode, more specifically for an Apigility installation.

One feature that piqued my interested in the Apigility skeleton application was development mode. [...] Behind the scenes, this [call to public/index.php] runs an action in DevelopmentModeController which copies config/development.config.php.dist to config/development.config.php. Then there is some code in public/index.php that ensures that this file is loaded.

You can then have a ModuleManager instance specifically for the development version and configuration. This allows for a greater amount of customization and removes some requirements you might have had in production. He's also created a module that handles some of this for you automatically you can drop into your installation.

0 comments voice your opinion now!
zendframework2 apigility development mode tutorial

Link: http://akrabat.com/computing/implementing-a-zf2-development-mode/

Johannes Schlüter's Blog:
Testing persistent connection and thread-safety features in PHP
March 22, 2012 @ 09:51:58

In this recent post to his blog Johannes Schlüter he talks about a way that he's come up with to test functionality that uses persistent connections (and an module he created to help).

In a few rare cases this is not what people like, for that PHP introduced "persistent connections" of different kinds. Testing those is a bit annoying as you have to configure a webserver and ensure to hit the same instance over the course of a test and then use a load generator, probably one which can detect a failure. Additionally by having a webserver in the game there is more code being executed, which might mean an additional source for trouble while debugging. An alternative might be using FastCGI, while that adds it's own issues for such a test. To solve this for myself I, some time ago, wrote a PHP SAPI module called pconn and pushed it to github.

The extension provides a way to emulate requests by executing a script multiple times automatically, making it easier to test things that require checking against multiple things simultaneously. While the built-in webserver (PHP 5.4) can be used to test some of these things too, Johannes' extension can also be compiled to help with testing of threading in applications as well.

0 comments voice your opinion now!
testing persistent threat safe extension sapi module webserver


DevShed:
Null and Empty Strings
December 03, 2008 @ 11:16:51

On DevShed today, there's a new tutorial posted looking at two things that can cause headaches for PHP developers (especially when evaluating and comparing values) - nulls and empty strings.

Anyone who has programmed for any length of time has encountered the concepts of null and empty strings. They are not the same, and confusing the two can cause some serious problems. This article deals with these concepts in the context of PHP and MySQL.

They start with a bit of a quiz before getting into how to handle them correctly - making null "safe" and working with it correctly in a MySQL context. SQL statements and table structures are included for their examples.

0 comments voice your opinion now!
null empty string tutorial mysql handle safe


Mike Lively's Blog:
Late Static Binding (LSB) forward_static_call()
April 09, 2008 @ 11:24:19

On his blog, Mike Lively has posted a look at some of the work he's been doing on patches for the late static binding functionality to be included in PHP, including an example of the updates in action.

This weekend I wrapped up a few small tests and sent the patch in and it was subsequently pushed to php 5.3 and php 6.0. Now, this is not at all the way I wanted things to work, in all honesty I think the patch is pretty hokey but unfortunately nobody really spoke up in support of the changes I wanted to make to parent:: in regards to LSB.

His example shows how to override a static method and push that new method's execution to the parent class (in two ways - safe using forward_static_call and the not so safe calling itself with a parent:: override).

0 comments voice your opinion now!
latestaticbinding php5 php6 patch safe unsafe parent forwardstaticcall


Job Posting:
MODE Visual Seeks PHP Developer (Charlotte, NC)
February 01, 2008 @ 13:31:38

Company MODE Visual
Location Charlotte, NC
Title Web Developer
Summary

We're looking for a full-time onsite Web Developer with a focus in PHP. Alongside our Director of Technology, you will be driving a variety of web development projects combining front and back-end programming for national clients. We are a small design and interactive studio so there is tremendous opportunity for growth and diverse work for national clients and innovative brands.

Tech Details
You should be a person who constantly desires to stay up-to-date on development trends, technologies and innovations. You should be an expert in PHP/MySQL development in an MVC framework. You'll distinguish yourself if you have in-depth knowledge of multiple languages, platforms and technologies including:

  • ASP.NET (2.0+)
  • JAVA
  • MySQL
  • Javascript (AJAX)
  • XHTML / CSS
  • Actionscript
  • Version control (Subversion/Git)

Other capabilities and experiences that are desired include: eCommerce experience, a web design sensibility, Flash skills and comfort with the Adobe CS Suite.

Responsibilities

  • Develop, maintain and support large, high-availability, web based internal applications and reporting tools; support high-traffic commercial websites
  • Interest in creating the next generation of interactive media applications
  • Research new platforms and architecture to support current and future business requirements
  • Ensure consistency and adherence to MODE's standards, processes, and policies for all projects.

Required Skills

  • 2+ years web development experience
  • experience in client facing communications
  • Computer Science degree or equivalent experience
  • Excellent analytical/problem solving skills, ability to think creatively and solve complex technical problems
  • Quality oral/written communication and interpersonal skills in order to effectively partner with the technologies and business communities
  • Ability to develop a clear understanding of client needs and plan applications to meet their needs.

    As a MODE team member, you'll be rewarded with:

  • A fun, friendly work environment
  • Competitive salary commensurate with experience
  • Casual dress code
  • Performance-based bonus
  • Generous paid vacation (19 floating days, 6 holidays)
  • 100% employee covered medical benefits
  • Possible relocation assistance
  • Great North Carolina weather

    If interested we ask that you write a cover letter including the following:

  • Why you are right for our position
  • Your salary requirements
  • A set of 3 urls that demonstrate work you are most proud of including a brief description of your role on each project

    Please send your cover letter and resume to jobs@modevisual.com with subject "Web Developer".

  • Link More Information
    0 comments voice your opinion now!
    job post mode visual charlotte nc developer web job post mode visual charlotte nc developer web


    Andrei Zmievski's Blog:
    50% There
    December 20, 2006 @ 08:08:02

    Andrei Zmievski has posted an encouraging note on his blog about the progress of PHP6 concerning the number of functions that have been correctly converted to support Unicode.

    Well, PHP boys and girls, this feels like quite a milestone: 50% of the 3084 functions that are bundled with PHP 6 have been upgraded to support and work safely with Unicode.

    He includes a small chart beside the post as well showing where things are currently at like the safe vs unsafe functions.

    0 comments voice your opinion now!
    unicode conversion function safe half unicode conversion function safe half


    Tobias Schlitt's Blog:
    Taint mode for PHP?
    December 19, 2006 @ 11:03:00

    Tobias Schlitt has a great (long) post responding to a proposal made on the php.internals mailing list for the inclusion of "taint mode" in upcoming PHP versions.

    Tobias starts with an overview of what "taint mode" is so that everyone's on the same page. His example involves the incoming and outgoing data usually involved in an application and how the incoming can be the most problematic when it comes to the values inside. This is where taint mode can come to the rescue. At its most basic level, it's a method for, assuming everything coming in is "tainted", creating a mechanism to automatically clean the data before it's even touched.

    With the basics down, Tobias looks back to the proposal for a few additional comments. He considers the proposal a great way to introduce the functionality to the language. There are some draw backs he mentions, though, including the additional overhead of working through every inputted value.

    Overall, I think this whole thing would be a great addition to PHP and I hope this could come for 6.0. What do you think?

    You can also check out some other opinions on the matter:

    0 comments voice your opinion now!
    taint mode proposal basic insecure data opinion response taint mode proposal basic insecure data opinion response



    Community Events

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


    extension php7 framework language wordpress interview release library opinion list version unittest laravel introduction community laravel5 podcast series api voicesoftheelephpant

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