This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

📣 Join the live AMA session with Adam Silverstein on open source and WordPress core! Register Now →

Phil Sturgeon Talks About API Development, PHP-FIG, PHP Books and the Future of PHP

Updated on December 13, 2021

5 Min Read

Today we are super excited to have Phil Sturgeon with us for this interview. Phil is a cool dude and an experienced API dev. He has a lot of experience in creating API for different platforms. Right now, he is working at WeWork as a Platform Engineer. He has written an excellent book on creating API, “Build APIs You Won’t Hate”. He has worked with popular PHP tools and frameworks including CodeIgniter, FuelPHP, PyroCMS. Phil also contributed to PHP The Right Way and PHP-FIG.

Phil also speaks at PHP conferences and often mentors budding developers. In this Interview he talks about his development experiences, workflows and experience with API development.

Phil Sturgeon

Cloudways: Hi Phil How are you? It’s great to have you onboard for this interview. How did you get started with PHP development and what motivates you to be such an exceptional developer?

Phil: Hey! I’m certainly not exceptional! I just blog more than most developers. Talking about what you’re working on is super helpful for other developers as they learn new things. Taking topics that I think are really difficult, grinding them down until I understand them, then posting about them in simple humanspeak has always been a successful process for me.

Cloudways: Programming needs a lot of practice and a mentor to help them along the way. Who has been your mentor(s)?

Phil: Martin Fowler is an exceptionally clever developer, and always has good advice written about a decade before I needed it.  I’m generally inspired by my friends in the PHP League, who are always making cool stuff, and teaching me new things. Alex Bilbie has taught me a lot about OAuth that I really would have suffered without.

Cloudways: Phil, many developers consider PHP 7.x as a major achievement for the language. What do you think of PHP 7.x and how could developers use it in their projects?

Phil: PHP has always suffered inconsistencies in various forms. Now with uniform variable syntax, abstract syntax tree, context sensitive lexer, PHP 4 style constructors going, internal class constructors behaving, PHP has made a huge leap towards having a consistent lexer, parser, and engine.

Improve Your PHP App Speed by 300%

Cloudways offers you dedicated servers with SSD storage, custom performance, an optimized stack, and more for 300% faster load times.

This has allowed for performance gains, and code cleanup along the way, with handy new features being added alongside! If PHP 8 can solve the standard library inconsistencies, PHP is going to be in a very pretty position.

Cloudways: How do you manage multiple projects. What development workflows and tools do you use?

Phil: Vagrant and Docker help keep projects wrapped up and isolated, so most of the time I use those if the dependencies are complex enough to warrant it. These days, I’m working mostly on APIs, so a lot of the time I just pull down the git repo, composer install, php -S or run the test suite.

Cloudways: You are an active contributor to PHP-FIG. How PSR standards help developers in creating robust code?

Phil: Not anymore! PyroCMS was bought out a while ago. I stuck around for a while to provide input when I thought I had something to offer, but these days the FIG has things nicely under control. Internally, they nicknamed a new approach for the group “FIG 3.0”, which has the focus on working groups, standards that require implementations to exist in the wild, and a more standards-body-like approach to generating standards.

In the history of the FIG, some of the recommendations were considered to be rushed, and some took two years to produce a result most folks weren’t happy with. This new approach should solve all those problems.

Related: Michael Cullum Talks About PHP FIG, PSR & Symfony

Cloudways: You have authored several books on PHP and several CMS. What advice would you give to developers who wish to get their work published?

Phil: Just publish it yourself. Traditional publishers offer an advance (a loan), and they’ll keep 100% of your royalties until that loan is paid off. Afterwards, you might get 40% of royalties, which is pathetic. LeanPub give you 90% of the eBook royalties, then you can use CreateSpace to make the physical book if LeanPub does well.

LeanPub recommend “publish early, publish often.” This approach is awesome, as I started selling a highly discounted version of the book after a few chapters, then the sales motivated me to continue writing. Spending a few hundred dollars on a great cover design will get you drastically more sales, and the returns will dwarf the initial cost.

Cloudways:  I see that you have done a lot of projects in Codeigniter. Are you partial to Codeigniter or would you recommend some other framework(s) to developers?

Phil: I quit CodeIgniter years ago, because it was in a strangle hold by the company who owned it, and they refused to allow it to change, or adapt to leverage any new PHP features since PHP 5.2. These days some students are taking care of it, but it’s so far behind everything else it will be a brand new framework if it ever manages to get v4 out. Use Slim, Lumen or Laravel.

Cloudways: At conferences, you often speak about the benefits and usage of API. How would you differentiate between REST API and web services?  

Phil: An API is an application program interface, which most web services have. You need to interact with a web service somehow, so whether that is via HTTP, AMQP, etc., that is an API.

REST is an architecture that outlines a set of principles, which can help an API last for decades. REST is commonly implemented in HTTP, but could be implemented in anything.

Cloudways: What do you do for fun? Do you enjoy the outdoors? What are your hobbies?

Phil: I ride bikes a whole lot. I’ve been doing a lot of multi-day rides to raise money for charity, exploring the mountains near New York and New Jersey, and racking up a few thousand miles per year in the process. These days I’m getting into road and cyclocross racing, and it’s a whole pile of fun.

Cloudways: Phil, What do you think about managed hosting solutions like Cloudways that provide a full-featured and highly optimized PHP stack with Laravel and other applications? Do you think that managed hosting solutions help developers kickstart web projects without worrying about server management issues?

Phil: I think they’re a great idea. A lot of developers have zero interest in managing their production stack, they just want to write code and get paid. Maybe they want somewhere to host their clients websites, without being phoned at 3am complaining some site they were paid $200 for 3 years ago is down. If Cloudways can help avoid that, it’s a winner in my books.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Shahroze Nawaz

Shahroze is a PHP Community Manager at Cloudways - A Managed PHP Hosting Platform. Besides his work life, he loves movies and travelling.

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour

CYBER WEEK SAVINGS

  • 0

    Days

  • 0

    Hours

  • 0

    Mints

  • 0

    Sec

GET OFFER

For 4 Months &
40 Free Migrations

For 4 Months &
40 Free Migrations

Upgrade Now