Domnikl/DesignPatternsPHP. 25 PHP Developers to Follow Online. Building PHP frameworks is hard, but following these PHP source and framework committers on Twitter is easy.
You’ll learn lots of interesting bits about what’s happening in their respective communities, and if you want to see where the PHP and PHP framework communities are going next, just watch your feed for these folks. Here’s a list of 25 PHP developers we’re following online. We hope you find their expertise useful and be sure to check back for more PHP-related posts to come. 1. Rob Allen. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. PHP Testing Basics - Tuts+ Course. 8 Must Have PHP Quality Assurance Tools. Quality Assurance in PHP is a valuable but very rarely seen aspect.
In a world focused on rapid deployment and a “ship now, worry later” mentality, a focus on quality is a rare sight, especially when dealing with the web. One of our authors recently directed my attention to Sebastian Bergmann’s site, PHP QA Tools. The site is a simple list of interesting tools that can help you properly test your application, while also analyzing it and producing interesting data for you to look at.
This post will be little more than a re-iteration of some of those tools with added information, use cases and advice about them – however, we’re open to expanding this list with other QA tools you throw our way that get plenty of votes in the comments below or seem interesting and/or useful enough. 1. Mr. PHPUnit can be installed globally, by running composer global require "phpunit/phpunit=4.1. *". 2. You then write classes with methods which define the specific sentences, such as: Setting a timeout for PHP sessions.
Introduction In this article I aim to explain the reasons why PHP sessions expire after a set period of inactivity, and how this mechanism works.
I'll describe two commonly used methods to control the lifetime of a session, and show how to do so in your code. The problem PHP's session mechanism allows us to store data for clients on the server to make it persist through multiple requests. However, because the data itself is stored on the server, and the only thing connecting client's to their respective sessions on the server is a simple cookie, this creates a major security concern. An exploit known as session hijacking is when a malicious third party intercepts or steals the session cookie from a client, and uses it to access the data from an active session. The server can do little to defend against this because it has no way to tell the original client from the hijacker.
PHP Cheat Sheet. Array Array Constants CASE_LOWER Used with array_change_key_case() to convert array keys to lower case CASE_UPPER Used with array_change_key_case() to convert array keys to upper case SORT_ASC Used with array_multisort() to sort in ascending order SORT_DESC Used with array_multisort() to sort in descending order SORT_REGULAR Used to compare items normally SORT_NUMERIC Used to compare items numerically SORT_STRING Used to compare items as strings SORT_LOCALE_STRING Used to compare items as strings, based on the current locale COUNT_NORMAL COUNT_RECURSIVE EXTR_OVERWRITE EXTR_SKIP EXTR_PREFIX_SAME EXTR_PREFIX_ALL EXTR_PREFIX_INVALID EXTR_PREFIX_IF_EXISTS EXTR_IF_EXISTS EXTR_REFS String String Constants CRYPT_SALT_LENGTH Contains the length of the default encryption method for the system.
Date/Time. An Opinion On The Future Of PHP. There's been a lot of buzz in the community lately around PHP and its future.
The vast majority of this buzz has been distinctly positive, which is awesome to hear. There's been a lot of talk about PHP6 and what that might look like. There's been a lot of questions around HHVM and its role in the future of the language and community. Well, let me share with you some of my thoughts in this space... On Backwards Compatibility In my opinion, backwards compatibility must be mostly maintained in a future major release (call it 6, 7, 99, "enthusiastic elephpant", whatever). Symfony 2.3, el libro oficial. (18) PHP (programming language): Why is PHP hated by so many developers. How to create include path for PHP in five ways. S blog: Security Review: Creating a Secure PHP Login Script. The other day, an article popped up in my feed reader that had a very interesting title (to me at least), Simple and Secure Login Script.
As usual, I decided to click the link and give the article a read. Not overly shocking was the fact that I didn’t find the content of the article to be, how shall I say this…, overly factual. Sculpin — PHP Static Site Generator. DrupalCamp México 2014. PHP: a fractal of bad design - fuzzy notepad. (This article has been translated into Spanish (PDF, with some additions) by Jorge Amado Soria Ramirez — thanks!)
Preface I’m cranky. I complain about a lot of things. There’s a lot in the world of technology I don’t like, and that’s really to be expected—programming is a hilariously young discipline, and none of us have the slightest clue what we’re doing. Combine with Sturgeon’s Law, and I have a lifetime’s worth of stuff to gripe about. This is not the same. (86) Phil Sturgeon's answer to PHP Frameworks: Laravel vs CodeIgniter: which one is recommended.
5 Things CodeIgniter Cannot Do (without a rewrite) Now that PHP 5.2 is gone from my life entirely I am a happy man.
As I don't use PHP 5.2 anymore I no longer need a 5.2 framework, so I quit the CodeIgniter team and started focusing on my new job. Kapture is all PHP 5.4, and PyroCMS is moving to be PHP 5.3, so I can use anonymous functions, short ternary operators, namespaces, go fully PSR-2 and use Composer all the way. PHP 5.3 is a massive change from PHP 5.2 as of course it was meant to be PHP 6, so while it might SEEM like a small update it's really not. It opens up doors to whole new possibilities, a newer more mature style of programming and sucks SO MUCH LESS than earlier versions of PHP. PHP: The Right Way.
Syntax Check PHP 5.3 File. Meandeviation.com > learn php > php syntax check 5.3 Many PHP systems are configured not to show syntax errors (or other errors) on production web servers.
If you are running a separate development server or running a server on your own PC you can set the display_errors flag to true in php.ini. This will also make it easier to check other kinds of errors. However, if you cannot do this for some reason, or you just want a quick check of the PHP syntax, then this page is for you! Simply select the PHP file you would like below and then press 'Check this File'. You can download this script (tarball): php-syntax-check.tar.gz It will need some configuring for your system.
Note this will checked against PHP 5.3. PHP Code Checker - Syntax Check for Common PHP Mistakes. PHP Image Rotation Iphone Portrait EXIF Orientation GD2 and imagemagick Libraries. I was adding PHP image upload and delete functions to an application the other day – when I came upon a few problems.
The iPhone 4S images that were taken in Portrait mode, and then uploaded, did not display with the appropriate portrait orientation (The orientation of the camera relative to the scene, when the image was captured.). They were saved on the iPhone, still in the Landscape mode – although they were taken as Portrait. For whatever reason, the iPhone 4S saves both Portrait and Landscape images with the same Landscape (Width greater than Height) display orientation. The Problem: I can’t use the standard methods to detect which image is actually portrait or landscape – as both Landscape and Portrait are saved as width=”3264″ height=”2448″.
The Portrait images uploaded were displaying as Landscape. The Solution: Read the EXIF Header Data within the image. Estándares de codificación en PHP (PSR0, PSR1, PSR2 y PSR3) Publicado hace 3 meses en estandares , php , psr0 , psr1 , psr2 y psr3 por CodeJobs Hola a todos, en esta ocasión me gustaría hablarles un poco sobre estos estándares de codificación en PHP (PSR0, PSR1, PSR2 y PSR3) los cuales son aceptados por la gran comunidad de PHP. Este es el primero de los estándares y nos especifica las siguientes reglas: Puntos Obligatorios Los namespaces y las clases deben tener la siguiente estructura \<Vendor name>\(<Namespace>)*<Class Name> Cada namespace debe tener un namespace superior ("Vendor name"). Cada namespace puede tener tantos sub-namespaces como se quiera. PHP Class for converting XML to Object and Object to XML « A K Chauhan’s Blog. How to Debug PHP Using Firefox with FirePHP.
Typically, there are two main ways of debugging server-side code: you can utilize an Integrated Development Environment (IDE) with a built-in debugger or log and perform your debugging processes in a web browser. This article shares an elegant, simple, and more maintainable way of debugging Ajax apps via the web browser (more specifically for the Mozilla Firefox browser). You’ll learn the basics of leveraging Firefox in conjunction with Firebug and FirePHP to implement FirePHP libraries on web apps and logging messages in the Firebug console.
A Brief Introduction When Ajax techniques became popular, developers faced a new problem: how can we debug Ajax requests and responses efficiently for complex web applications? Xdebug - Debugger and Profiler Tool for PHP. PHP and the i, Part 2. In the last part we looked at why the IBM i (AS/400, System i, i) is not a dinosaur but instead a very powerful machine that can function as either a standalone mainframe or as a very cost effective and scalable server. Just remember what will happen if you don’t believe that; I will track you down and fight you in a bar. Forewarned is forearmed as Cacciaguida once said. RC4 Crypt.