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

Christoph Rumpel:
Build a PHP chatbot in 10 minutes
Aug 15, 2016 @ 09:45:23

Christoph Rumpel has written up a tutorial showing you how to build a PHP chatbot in 10 minutes by hooking a PHP 7 based script in, via webhooks, to a Facebook Messenger application.

The chatbot topic is huge right now. Finally there is something quite new again and nobody knows what's happening next. This is the perfect time to start experimenting with chatbots and to build your own one right now. Give me 10 minutes of your time and I will give you your first chatbot!

He then walks you through the full process if setting up the Facebook Messenger application, a page to host it from and using the Chatbot boilerplate code to connect the application back to the Facebook platform. This includes both the code needed and screenshots along the way of what you can expect to see during setup. The result is a bot that can respond with, at first, a static string then is modified to show simple exchange rate data.

tagged: chatbot facebook tutorial boilerplate code example application webhook

Link: http://christoph-rumpel.com/2016/08/build-a-php-chatbot-in-10-minutes/

The Changelog Podcast:
#211: Open Source at Facebook with James Pearce
Jul 15, 2016 @ 10:43:46

There's an interesting new episode of The Changelog podcast that's been posted today featuring James Pearce, head of Open Source at Facebook. They talk about Facebook's stance on open source and contributing along with the support they give.

This week we’ve got a big show with James Pearce, Head of Open Source at Facebook, to talk about that very subject — open source at Facebook. We talked about his path to software development, why he’s the person to lead open source at Facebook, their view on open source, their culture of open source, how they choose what to open source, and more importantly — how they focus on, support, and nurture the community.

You can listen to this episode either through the in-page audio player or by downloading the mp3 directly. If you enjoy the show, be sure to subscribe to get notified when new shows are released.

tagged: thechangelog podcast ep211 facebook opensource jamespearce

Link: https://changelog.com/211/

Symfony Finland:
GraphQL with PHP and the Symfony Framework
May 16, 2016 @ 12:19:09

The Symfony Finland site has a recent post giving an overview of GraphQL and Symfony, combing the GraphQL query language (RESTish handling) from Facebook with your application.

The origins of GraphQL stem from the needs that Facebook's mobile applications had (and continue to have). They needed a data-fetching API that was flexible enough to describe all the different kinds of data that the social network had available. [...] Back in September 2015 GraphQL was already powering Billions of API calls a day at Facebook. [...] The core idea of GraphQL is to send a simple string to the server. This string is then interpreted by the server and it sends back a JSON payload that responds to follows the structure of the query itself.

The post includes an example of what the request and response from a GraphQL query might look like for a social network's data. They also link to several PHP libraries that have come up around the functionality making it easier to integrate. There's also links to some Symfony bundles that provide functionality to make your own GraphQL servers.

tagged: graphql symfony bundle introduction facebook rest query json library

Link: https://www.symfony.fi/entry/graphql-with-php-and-the-symfony-framework

Cloudways Blog:
Sammy Kaye Powers Talks About PHP Community
Jan 12, 2016 @ 10:55:50

The Cloudways blog has interviewed another member of the PHP community in their latest post. In this article they talk with Sammy Kaye Powers, a PHP community member from Chicago.

If there is someone you are looking forward to following in the PHP community, then Sammy Kaye Powers is your go to guy! Sammy is a very active guy in the PHP Community. He is the host of PHP roundtable podcast and the co-organizer of Chicago PHP user group.

Along with being an active member of the PHP community, he has in his arsenal more than 15 years of experience in web development, along with having vast experience in Laravel. He is also a contributor of the official Facebook PHP SDK v5. In this interview with Cloudways, Sammy shared his views about PHP7, Laravel, Facebook and The PHP Community and how an amateur can benefit from becoming an active part of the community.

They start off with some basic introductory questions about Sammy's background in development and with PHP. They also talk about his work on the PHP Roundtable Podcast and his contributions to both the Laravel and Silex frameworks. Sammy then answers some questions about his work on Facebook applications, how he views the growth of the PHP community and his contributions including PHP documentation updates and speaking at conferences and online sessions.

tagged: cloudways sammykayepowers interview community phproundtable facebook speaking conference

Link: http://www.cloudways.com/blog/interview-sammy-kaye-powers

HHVM Blog:
Improved User Documentation
Dec 15, 2015 @ 09:05:32

The HHVM blog has a post today announcing some updates they've made around the documentation for the project and the release of the "next generation" of their documentation at http://docs.hhvm.com/.

Back in August, we announced that we are going full force in revamping user documentation. We sent out a public survey to gauge the standing on the existing documentation at the time. We had 160 responses to the survey. Those results served as both validation and a guide to our approach with the new documentation.

The survey showed some interesting results including that the existing documentation could use improvement, better content in certain sections and poor examples in some places. In order to help this they worked hard to revamp the documentation and created a new GitHub repository for the docs and allows developers to pull it down locally and contribute back content/corrections as they might catch them. They also lay out the new documentation structure, breaking it up into Hack, API and HHVM sections. Finally, they talk about the technology behind the site including the runnable code examples, how they're generated and what the build process looks like.

tagged: improved documentation user hhvm hack facebook api survey results

Link: http://hhvm.com/blog/10925/improved-user-documentation

HHVM Blog:
PHP 7 Support
Dec 08, 2015 @ 09:16:48

On the HHVM blog (Facebook's HipHop Virtual Machine project) they've posted about support for PHP 7 features that they've been working into HHVM and Hack to support backwards compatibility with this latest major version of the PHP language.

For those that haven’t been following along, the next version of the PHP language, version 7.0.0, was very recently released. Those of us working on HHVM offer our congratulations to all the contributors to this latest release! We’re all really excited to see this release come out the door, and for what it means for the future of PHP.

The release has implications for HHVM as well. [...] The HHVM project is committed to continuing to support the evolving PHP language, and as such we are proud to announce that the current nightly releases have support for all major PHP 7 features, and the upcoming 3.11.0 stable release will be the first release of HHVM with support for the major PHP 7 features.

There are some backwards compatibility issues that PHP 7 introduced but the HHVM project has opted to support both the PHP 5 and 7 users simultaneously. This is made as low friction as possible either through silent compatibility or though a hhvm.php7.all ini configuration setting.

tagged: hhvm hiphop facebook hack php7 backwards compatibility

Link: http://hhvm.com/blog/10859/php-7-support

PHP Roundtable:
018: F8 Afterglow & The PHP SDK
Apr 27, 2015 @ 11:35:38

The PHP Roundtable Podcast has posted their latest episode today, hosted by Sammy Powers and featuring guests Fosco Marotto and Nathan Stokes. In this new episode they talk about their experiences at the Facebook F8 conference and their PHP SDK.

A short afterglow discussion about the 2015 F8 Facebook Developer Conference in San Francisco, CA & a look at the new Facebook PHP SDK and where it's headed.

You can catch this latest episode through the in-page video player. If you enjoy the episode, be sure to subscribe to their feed to get the latest as they're released.

tagged: phproundtable podcast video ep18 facebook f8 conference foscomarotto nathanstokes

Link: https://www.phproundtable.com/episode/f8-2015-facebook-developer-conference-and-the-new-php-sdk

SitePoint PHP Blog:
Social Logins in PHP with HybridAuth
Apr 16, 2015 @ 11:54:14

The SitePoint PHP blog has posted a new tutorial showing you how to integrate the HybridAuth library into your application for easy logins via popular social sites like Facebook, Twitter or even Google+.

A trend in many of today’s websites is a feature that allows users to sign in via their social network accounts. A classic example is the SitePoint community where users have the option to use their Facebook, Twitter, Google, Yahoo or GitHub account to log in without having to register an account. In this tutorial, we will be learning about HybridAuth – a PHP library that takes the pain out of building a social login feature. HybridAuth acts as an abstract API between your application and the various social APIs and identity providers.

They jump right into things, showing you how to install the library via Composer and configure it to work with a simple Slim-based application. They set up providers for Facebook, Twitter and Google+ and show how to call the "authenticate" method to make the connection. He then starts on the sample application, creating a login page and a database table for user tracking. The process continues showing how to connect the user from the social site to your setup and retrieve their profile information. All the code you'll need is here, including the Slim structure, the database connection setup and the needed templates. You can also find the finished product in this GitHub repository.

tagged: social login tutorial hybridauth facebook twitter googleplus socialnetwork

Link: http://www.sitepoint.com/social-logins-php-hybridauth/

HHVM Blog:
Announcing a Specification for Hack
Feb 20, 2015 @ 13:51:15

Similar to how the language specification was released for PHP a little while back, the HHVM team has announced a new specification for Hack, the language they've created as a part of the HipHop VM project that's similar to PHP.

When we announced Hack, we were very excited for the community to get their hands on a programming language that has helped Facebook engineers become more productive in their day-to-day development and became, alongside PHP, the language used when developing applications running on HHVM. At the time of release, we had documentation geared for the programmer using Hack to develop applications. However, we did not have official documentation for those that might want to create a Hack implementation of their own or something like a Hack conformance test-suite. This specification fills that gap. It is the document for the Hack implementer, and an excellent supplemental document for the Hack user.

The remainder of the post talks about some of the reasoning behind creating the specification, pointing to resources where you can help contribute and a few thanks to some of the people that worked on it.

tagged: specification hack hhvm facebook hiphop language

Link: http://hhvm.com/blog/8537/announcing-a-specification-for-hack

Facebook Code Blog:
Announcing the Hack Transpiler
Nov 12, 2014 @ 12:11:47

On the Facebook Hack blog there's an announcement about a new tool they've created to "reverse engineer" Hack code and turn it back into normal PHP - the Hack Transpiler. There's also more information in the Facebook announcement:

Today, we're proud to announce a first, experimental release of h2tp, or the “HH (Hack) Transpiler,” a tool which allows projects that have converted from PHP to Hack to still make releases that target the PHP language.

Since the launch of Hack, many community members have asked us how to manage forward compatibility. Hack is backwards-compatible with PHP - if you're running PHP on HHVM, Hack code will seamlessly integrate with it. But the inverse is not true.

The announcement talks about the things that make Hack, well, Hack and how it's not just a simple find and replace to convert it back into PHP. Their "h2tp" tool also converts things like collections and short lambda expressions back into structured PHP. To illustrate, they include some before and after code, showing the addition and substitution of PHP for the Hack shorthand operators. The post also covers some of the hurdles they faced during the implementation of the "h2tp" tool, including error handling.

tagged: facebook hack tool covert language h2tp hhvm language

Link: https://code.facebook.com/posts/398235553660954/announcing-the-hack-transpiler/