PHP Icon

PHP

PHP is a scripting language that works particularly well for server-side web development.
40 Stories
All Topics

The Changelog The Changelog #321

Drupal is a pretty big deal

Adam and Jerod talk with Angie Byron, a core contributor and staple of the Drupal community. We haven’t covered Drupal really (sorry about that), but the call with Angie was inspiring! From the background, to the tech, the usage of the software, the communication at all levels of the community — Drupal is doing something SO RIGHT, and we’re happy to celebrate with them as they march on to the “Framelication” beat of their own drum.

read more...

Go github.com

A high-performance PHP app server, load balancer, and process manager

RoadRunner is an open source (MIT licensed), high-performance PHP application server, load balancer and process manager. It supports running as a service with the ability to extend its functionality on a per-project basis. RoadRunner is written in Go, and can be used to replace the class Nginx+FPM setup, boasting “much greater performance”. I’d love to see some benchmarks. Better yet, I’d love to see someone use this in production for a bit and write up their experience.

read more...

Go changelog.com

Generate 4 language bindings for your API in one Go

You just built an API, and want to make sure everyone can use it. Building libraries in every language isn’t only going to be hard, its going to take a lot of time. Time you don’t have. This is where Alpaca can help. You define your API according to the format, alpaca builds the API libraries along with their documentation. All you have to do is publishing them to their respective package managers. Right now it can generate API clients in PHP, Python, Ruby, and JavaScript. You can see examples of the generated client libraries here. I can’t speak to the quality of all the generated language bindings, but I took a cursory look at the Python lib and it looks good. Looks like Alpaca could save us all a lot of time.

read more...

PHP changelog.com

PredictionIO, a machine learning server for software developers and data engineers.

Want to add personalization such as recommendations or content discovery to your application? PredictionIO has your back. You can download and install the server yourself or use their cloud infrastructure. Clients already exist for Java, PHP, Python, and Ruby, and I assume more are on the way. Check out all of their open source goods right here.

read more...

PHP changelog.com

Meet Boris, a tiny REPL for PHP

Chris Corbyn was frustrated with PHP’s lack of a good REPL, so he took matters into his own hands and created Boris. I can relate to Chris’s experience. Back when I used to write WordPress plugins I got so frustrated by the lack of a Rails-like interactive console that I created one for WordPress. Boris is cooler than my little plugin because it works outside of WordPress and runs directly in your terminal. Check it out in action: You can install Boris via Packagist or use it directly by cloning the repo: git clone git://github.com/d11wtq/boris.git cd boris ./bin/boris This and much more information about the REPL is available in the README. Boris is MIT licensed and hosted on GitHub.

read more...

JavaScript changelog.com

Bring your server side debug logging into the browser with Chrome Logger

If you find yourself jumping back and forth between Chrome’s Dev Tools and a terminal displaying your server side request logs, Craig Campbell’s Chrome Logger might be just the thing you need! It’s a Chrome extension which lets you see your server side logs right in the browser. There are currently libraries for: Python Ruby PHP Express Is your server side language/environment of choice not on that list? Don’t worry, Chrome Logger uses an open and published protocol so you can easily write client libraries of your own! See the project’s home page for more info or check under the hood if you’re curious about how it all works.

read more...

PHP changelog.com

Requests - HTTP library for PHP

Higher level libraries for dealing with HTTP are cropping up in almost every language. The latest is Requests, a PHP library from Ryan McCue. Inspired by Kenneth’s Python library of the same name, Requests aims to provide a better HTTP API than cURL: $headers = array('Accept' => 'application/json'); $options = array('auth' => array('user', 'pass')); $request = Requests::get('https://api.github.com/gists', $headers, $options); var_dump($request->status_code); // int(200) var_dump($request->headers['content-type']); // string(31) "application/json; charset=utf-8" var_dump($request->body); // string(26891) "[...]" I’ve written about my thoughts on what makes a good API wrapper and libraries like these that provide a more idiomatic experience are just great. Grab Requests on GitHub.

read more...

PHP changelog.com

Imagine - Unified PHP 5.3 API for GD2, ImageMagick, GraphicsMagick

Imagine is a nice looking image manipulation library for PHP 5.3+ that supports GD2, ImageMagick, and GraphicsMagick in a clean, chainable API from Bulat Shakirzyanov: <?php $imagine = new ImagineGdImagine(); // or $imagine = new ImagineImagickImagine(); // or $imagine = new ImagineGmagickImagine(); $size = new ImagineImageBox(40, 40); $mode = ImagineImageImageInterface::THUMBNAIL_INSET; // or $mode = ImagineImageImageInterface::THUMBNAIL_OUTBOUND; $imagine->open('/path/to/large_image.jpg') ->thumbnail($size, $mode) ->save('/path/to/thumbnail.png') ; Check out the extremely detailed project docs and examples for advanced usage.

read more...

PHP changelog.com

Options-Framework: Expose an options panel for your Thematic WordPress themes

I don’t always use WordPress, but when I do, I prefer Thematic (and compass-wordpress). Thematic is a WordPress theme framework from Ian Stewart that provides an abstracted API, letting you focus on your site instead of the lower-level minutia of WordPress. I was excited when I stumbled across a couple of projects by Devin Price that let you easily expose an options panel for your theme. Thematic Options (and the non-Thematic Options Framework) make it easy to add an options panel for your theme settings, letting your end users customize your theme in the WordPress admin panel. Options are declared in a PHP array, as in this example: // Set the Options Array global $my_options; $my_options = array(); $my_options[] = array( "name" => "General Settings", "type" => "heading"); $my_options[] = array( "name" => "Custom Logo", "desc" => "Upload a logo for your theme, or specify the image address of your online logo. (http://yoursite.com/logo.png)", "id" => "logo", "std" => "", "type" => "upload"); $url = ADMIN . 'images/'; $my_options[] = array( "name" => "Main Layout", "desc" => "Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.", "id" => "layout", "std" => "2c-l-fixed.css", "type" => "images", "options" => array( '1col-fixed.css' => $url . '1col.png', '2c-r-fixed.css' => $url . '2cr.png', '2c-l-fixed.css' => $url . '2cl.png', '3c-fixed.css' => $url . '3cm.png', '3c-r-fixed.css' => $url . '3cr.png') ); $my_options[] = array( "name" => "Custom Favicon", "desc" => "Upload a 16px x 16px Png/Gif image that will represent your website's favicon.", "id" => "custom_favicon", "std" => "", "type" => "upload"); $my_options[] = array( "name" => "Tracking Code", "desc" => "Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.", "id" => "google_analytics", "std" => "", "type" => "textarea"); ... Devin has a nice blog post with more info including how to use these values in your theme, along with an introductory screencast. [Source on GitHub]

read more...

PHP changelog.com

Respect, Validation for PHP developers

Are you a PHP developer who feels like you get no respect? That’s exactly what Alexandre Gomes Gaigalas and Carlos A. Ferrari are offering with their GitHub organization. Validation is billed as “the most awesome validation engine ever created for PHP.” While that might be the epitome of hyperbole, it is indeed nifty. Validation includes more than 30 chainable validators supporting composite validation of nested, grouped, and related rules. Let’s look at a simple example: use RespectValidationValidator as v; v::numeric()->validate($someNumber); //returns true or false We did mention chaning, right? //From 1 to 15 non-whitespace alphanumeric characters $username = 'alganet'; $validUsername = v::alnum() ->noWhitespace() ->length(1,15) ->validate($username); Validators are also reusable: $idValidator = v::int()->positive(); $idValidator->validate(123); //true $idValidator->validate(456); //true Be sure and check the Readme for advanced usage. Also be sure and check out Respect’s other projects including: Relational is a chainable abstraction for relational database queries Daemon is a library for managing daemon systems using PHP Stream is a lightweight, asynchronous, object-oriented layer for the great PHP stream API Env is a lightweight, transparent, testable and awesome environment wrapper for PHP [Source on GitHub]

read more...

JavaScript changelog.com

GitHub Follow Friday for 20101029

Another Friday, time to spotlight some GitHub folks you should follow. tenderlove (Aaron Patterson) The author of nokogiri and mechanize, Aaron also empowers you to do fuzzy texticle searches. isaacs (Isaac Z. Schlueter) The man who helps you manage your package using npm. abraham (Abraham Williams) The author of the canonical PHP library for the Twitter API and fun Chrome extensions, a cool dude who is master of his domain — name.

read more...
0:00 / 0:00