32 private links
:bathtub: Clean Code concepts adapted for PHP. Contribute to piotrplenik/clean-code-php development by creating an account on GitHub.
courses from MIT video youtube
Julien Pauli, PHP contributor and release manager, details what changed between PHP 5 and PHP 7, and how to migrate and make effective use of the language optimizations. All statements are documented with specific examples and Blackfire profiles. Third episode: Encapsed strings optimization dropping CPU usage by a factor of 10.
At this stage of our Bash basics series, it would be hard not to see some crossover between topics. For example, you have already seen a lot of brackets in the examples we have shown over the past several weeks, but the focus has been elsewhere.
For the next phase of the series, we’ll take a closer look at brackets, curly, curvy, or straight, how to use them, and what they do depending on where you use them. We will also tackle other ways of enclosing things, like when to use quotes, double-quotes, and backquotes.
This week, we're looking at curly brackets or braces: {}.
The BFG is a simpler, faster alternative to git-filter-branch for cleansing bad data out of your Git repository history:
Removing Crazy Big Files
Removing Passwords, Credentials & other Private data
The git-filter-branch command is enormously powerful and can do things that the BFG can't - but the BFG is much better for the tasks above, because:
Faster : 10 - 720x faster
Simpler : The BFG isn't particularily clever, but is focused on making the above tasks easy
Beautiful : If you need to, you can use the beautiful Scala language to customise the BFG. Which has got to be better than Bash scripting at least some of the time.
When developing websites, apps or blogs, code snippets can be a real time saver. Today, I’m sharing super useful PHP snippets that I’ve collected over the past months. Enjoy!
Introduction
PHP is a complex language that has suffered years of twists, bends, stretches, and hacks. It's highly inconsistent and sometimes buggy. Each version has its own unique features, warts, and quirks, and it's hard to keep track of what version has what problems. It's easy to see why it gets as much hate as it does sometimes.
Despite that, it's the most popular language on the web today. Because of its long history, you'll find lots of tutorials on how to do basic things like password hashing and database access. The problem is that out of five tutorials, you have a good chance of finding five totally different ways of doing something. Which way is the "right" way? Do any of the other ways have subtle bugs or gotchas? It's really hard to find out, and you'll be bouncing around the internet trying to pin down the right answer.
That's also one of the reasons why new PHP programmers are so frequently blamed for ugly, outdated, or insecure code. They can't help it if the first Google result was a four-year-old article teaching a five-year-old method!
This document tries to address that. It's an attempt to compile a set of basic instructions for what can be considered best practices for common and confusing issues and tasks in PHP. If a low-level task has multiple and confusing approaches in PHP, it belongs here.
What this is
It's a guide suggesting the best direction to take when facing one of the common low-level tasks a PHP programmer might encounter that are unclear because of the many options PHP might offer. For example: connecting to a database is a common task with a large amount of possible solutions in PHP, not all of them good ones—thus, it's included in this document.
It's a series of short, introductory solutions. Examples should get you up and running in a basic setting, and you should do your own research to flesh them out into something useful to you.
It points to what we consider the state-of-the-art of PHP. However, this means that if you're using an older version of PHP, some of the features required to pull off these solutions might not be available to you.
This is a living document that I'll do my best to keep updated as PHP continues to evolve.
What this isn't
This document is not a PHP tutorial. You should learn the basics and syntax of the language elsewhere.
It's not a guide to common web application problems like cookie storage, caching, coding style, documentation, and so on.
It's not a security guide. While it touches upon some security-related issues, you're expected to do your own research when it comes to securing your PHP apps. In particular, you should carefully review any solution proposed here before implementing it. Your code is your own fault.
It's not an advocate of a certain coding style, pattern, or framework.
It's not an advocate for a certain way of doing high-level tasks like user registration, login systems, etc. This document is strictly for low-level tasks that, because of PHP's long history, might be confusing or unclear.
It's not a be-all and end-all solution, nor is it the only solution. Some of the methods described below might not be what's best for your particular situation, and there are lots of different ways of achieving the same ends. In particular, high-load web apps might benefit from more esoteric solutions to some of these problems.
Awesome PHP
A curated list of amazingly awesome PHP libraries, resources and shiny things.
Contributing
Please see CONTRIBUTING for details.
Table of Contents
Awesome PHP
Dependency Management
Dependency Management Extras
Frameworks
Framework Extras
Components
Micro Frameworks
Micro Framework Extras
Routers
Templating
Static Site Generators
HTTP
Middlewares
URL
Email
Files
Streams
Dependency Injection
Imagery
Testing
Continuous Integration
Documentation
Security
Passwords
Code Analysis
Architectural
Debugging and Profiling
Build Tools
Task Runners
Navigation
Asset Management
Geolocation
Date and Time
Event
Logging
E-commerce
PDF
Office
Database
Migrations
NoSQL
Queue
Search
Command Line
Authentication and Authorization
Markup
Strings
Numbers
Filtering and Validation
API
Caching
Data Structure and Storage
Notifications
Deployment
Internationalisation and Localisation
Third Party APIs
Extensions
Miscellaneous
Software
PHP Installation
Development Environment
Virtual Machines
Integrated Development Environment
Web Applications
Infrastructure
Resources
PHP Websites
Other Websites
PHP Books
PHP Videos
PHP Reading
PHP Internals Reading
Contributing
Here is my Katas for creating BASH programs that work. Nothing is new here, but from my experience pepole like to abuse BASH, forget computer science and create a Big ball of mud from their programs.
Here I provide methods to defend your programs from braking, and keep the code tidy and clean.
We’ve all heard the saying “beware of code written by just one person,” and we know the benefits of making software as a team: you get different ways of thinking, different backgrounds and experiences... and when you bring those differences to bear on whatever problem you’re trying to solve, you end up with better software. It’s more maintainable, higher quality, and ultimately serves the user better.
Phabricator, an open source software engineering platform
Phabricator is a collection of open source web applications that help software companies build better software.
Introduction to Standard PHP Library (SPL)
Code review can be a bit of a recipe for drama. There was a large-ish amount of drama in a close project quite recently that stemmed from patch review, and it got me thinking about how we handle this in free software.
In free software code review, along with other practices that we call “agile practices” (such as continuous integration, unit testing, behavior driven design, test driven development) is a relatively new thing in some projects, especially those on the desktop stack.
Alternative #2: PDO – PHP Data Objects
The PDO extension supports twelve drivers, enabling it to connect to a variety of relational databases without the developer having to learn a number of different APIs. It does this by abstracting the database interaction calls behind a common interface, enabling the developer to utilize a consistent interface for different databases. This of course gives it a major advantage over both the MySQL and MySQLi extensions who are limited to only one database.
Gitalist
A web git viewer for your git repository (local or server)
Features
Multiple repository support
Multiple branch support
Commit comparisons
Atom feeds
Color coded commit history
Gitweb.cgi URL compatibility
Status
Status
Good enough to use, but with some rough edges
Java Tutorial
W dziale tym zajmę się programowaniem w C i C++ głównie dla Linuxa (ze względu na wykorzystywane funkcje systemowe tego systemu i testowanie w nim prezentowanych rozwiązań). Nie będzie to jednak typowe omówienie czy kurs tego języka, prócz krótkiego wprowadzenia w podstawy tego języka, zamieszczę tutaj szereg bogato komentowanych, niewielkich programów ilustrujących poszczególne zagadnienia. Omówię również korzystanie z ważniejszych/ciekawszych bibliotek (w tym bibliotek standardowych C i C++). Na wstępie zachęcam do zapoznania się z przykładem zamieszczonym w części "wstępu do techniki" poswięconej porgramowaniu, a także przykładom wprowadzającym w podstawy C i C++.