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

Three Devs & A Maybe:
Episode 97 - RFC Showdown for PHP 7.1 with Joe Watkins
May 12, 2016 @ 09:17:18

The Three Devs and a Maybe podcast has released their latest episode (#97) where hosts Michael Budd, Fraser Hart, Lewis Cains and Edd Mann are joined by internals developer Joe Watkins to talk about PHP RFCs targeted for PHP 7.1.

In this episode we are joined by Joe Watkins to discuss the many RFC’s that are in contention to be approved for PHP 7.1. We start off with a congratulations to Joe for his first PHP Release Manager position, highlighting what the role entails and how it is going. We then discuss the RFC process and how there has been a lot of activity over the past couple of weeks within this space.

The concept of ‘Null’ is the first group of RFC’s we discuss, followed by union/intersection types and the pipe operator. We then move on to chat about short closure syntax, functional interfaces and lexical scope within anonymous classes. Finally, we bring up the comparable RFC which has been around for many years and the benefits of having attributes within the language.

In the show notes they have links to all of the RFCs mentioned in the episode (there's lots of them) for your easy reference. You can listen to this latest episode either through the in-page audio player or by downloading the mp3 directly. If you enjoy the show, be sure to subscribe to their feed too.

tagged: threedevsandamaybe ep97 podcast joewatkins rfc php7 showdown

Link: http://threedevsandamaybe.com/rfc-showdown-for-php-7-1-with-joe-watkins/

Three Devs & A Maybe:
Episode 92 - Where is the Value? with Joe Watkins
Apr 01, 2016 @ 10:13:42

The Three Devs & a Maybe podcast has published their latest episode, Episode #92 - Where is the Value? with Joe Watkins. This time hosts Michael Budd, Fraser Hart, Lewis Cains and Edd Mann are joined again by Joe Watkins, a core developer on the PHP language.

In this week’s episode we start off discussion with a recent PHP RFC Joe has been working on in-regard to typed properties, bringing up the value (if any) surrounding getters and setters. We then move on to Joe’s views on designing a programming language, and his mind-set that there should be no defined scope surrounding the features that the language should adopt. Finally, we wrap up the show with an update on how stabilisation of uopz is going for PHP 7, along with a reflection on the ‘Hacking on PHP 7’ screencasts we released earlier this month.

You can listen to this latest episode either through the in-page audio player or by downloading the mp3 of the show. You can also subscribe to their feed if you'd like this and other episodes (past and future) delivered right to your client of choice.

tagged: threedevsandamaybe podcast ep92 value joewatkins rfc uopz php7

Link: http://threedevsandamaybe.com/where-is-the-value-with-joe-watkins/

Evert Pot:
Drop 'public' not 'var'!
Mar 28, 2016 @ 12:23:32

In a recent RFC that's been proposed and is now up for voting, the suggestion has been made to drop the var keyword in PHP 7.1 and completely remove it in PHP 8 (made a bit redundant buy the public keyword in classes). Evert Pot, however, disagrees and suggests dropping public instead.

A PHP RFC vote has started to deprecate the var keyword in PHP 7.1 and remove it in PHP 8. At the time of writing, there 23 who say it should be removed, and 18 who say it should not. [...] I’d like to offer a different opinion: I think people should be using var instead of public. I realize that this is as controversial as tabs vs. spaces (as in: it doesn’t really matter but conjures heated discussions), but hear me out!

He goes through an example on one of his own projects, showing how he's mostly removed the public level of exposure from his development (using final and statics instead). He then suggests three common thoughts he sees people having being in favor of dropping var versus public:

  • #1: Everyone doing the same thing is good
  • #2: It’s ugly!
  • #3: The public keyword is useful to convey intent

He also points to one place where he does see the need for a public but also suggests that in that case var would do juts fine too.

tagged: public var class exposure level rfc proposal voting

Link: https://evertpot.com/drop-public-not-var/

PHP Roundtable:
038: RFC Show & Tell
Feb 19, 2016 @ 10:36:16

The PHP Roundtable podcast, hosted by PHP community member Sammy Kaye Powers has released their latest episode (#38) featuring several guests talking about RFCs and some of the proposed features of PHP 7.1.x.

New features of PHP get added via the request for comments process. We chatting with a few RFC authors about what features they are proposing for the next major version of PHP.

This episode features guests that are no strangers to the RFC process:

  • Phil Sturgeon
  • Scott Arciszewski
  • Andrea Faulds
  • François Laupretre
  • Davey Shafik

You can listen (and watch) this latest episode either through the in-page video player or directly over on YouTube. If you enjoy the show be sure to subscribe to their feed to get this and links to other great episodes.

tagged: phproundtable podcast video ep38 rfc showandtell

Link: https://www.phproundtable.com/episode/proposed-features-of-php-71

Three Devs & A Maybe:
Episode 61 - Conference Experiences, RFC's & The PHP League with Phil Sturgeon
Apr 20, 2015 @ 08:58:40

The Three Devs and a Maybe podcast has posted an episode recently talking about some of their own experiences at conferences, RFCs and an interview with special guest Phil Sturgeon.

This episode we are fortunate enough to have Phil Sturgeon back on the show. Originally recorded on the 11th Feb and only now being released (blame Edd), the show starts of with a comparison between Phil and Fraser's snowboarding injuries. We then move on to discuss standing desks, Sunshine PHP, American weather, and conference experiences. Following this DDD (Development Driven Development...) is touched upon, along with a look at the current stack Phil is using at work. Finally we chat about the 'attack-of-the-clone' packages Phil has noticed around the PHP community (ultra-tiny-small-restful frameworks etc.) and how far the 'The League of Extraordinary Packages' has grown.

They talk some about The League but also about other topics including the No Capes podcast, the PHP UK Conference, the domain-driven design community and scalar type hints. You can listen to this recent episode either through the in-page audio player or by downloading the mp3 directly. If you enjoy the show, consider subscribing to their feed too.

tagged: threedevsandamaybe podcast ep61 conference experience rfc thephpleague philsturgeon

Link: http://threedevsandamaybe.com/conference-experiences-rfcs-and-the-php-league-with-phil-sturgeon/

Medium.com:
PHP7: More strict! (but only if you want it to be)
Mar 18, 2015 @ 10:48:38

In this new article Er Galvao Abbott talks about the struggle (and finally, inclusion) of type hinting in PHP, more specifically coming in PHP7, and how strict they can be.

It wasn’t easy (we knew it wouldn’t be) and certainly wasn’t pretty (we sort of knew that as well), but it’s finally official: PHP7 will come with Scalar Type Hints (STH) and an optional “strict mode”. [...] This is basically a step towards a more strict way of coding in PHP. Will we see more steps in that direction in the future? We don’t know and we’re OK with that for now. What’s brilliant about the body of work represented by these RFCs is that by implementing their concepts and specially making the “strict mode” optional the choice of being more strict remains with the programmer.

He talks some about the background of the want and need for strict typing in PHP and mentions three RFCs that will influence the type hints and handling in PHP7:

He summarizes each RFC and what it contributes to the language. He ends the post by dispelling one thing about all of this new typing functionality - PHP will remain loosely typed, this new functionality is in a "strict mode" only used when specified.

tagged: php7 strict type hint mode rfc introduction feature

Link: https://medium.com/@galvao/php7-more-strict-but-only-if-you-want-it-to-be-78d6690f2090

Phil Sturgeon:
PHP 7 Feature Freeze
Mar 16, 2015 @ 09:04:44

Phil Sturgeon has a new post to his site looking at the PHP7 feature freeze for this upcoming major PHP release (implemented as of yesterday, the 15th). In it he provides a list of features, their related RFCs and how likely they are to make it into PHP7.

Today was the feature freeze for PHP 7. That means no new votes can be started for a feature that is aimed at PHP 7.0, and would instead have to go into PHP 7.1. Instead of heading out to St Patric’s Day with a bunch of New Yorkers making dubious claims about their tenuous connection to Irish ancestry as an excuse to drink, I thought it would be a good time to review some of the more recent RFCs that made it in, and those that didn’t.

His list includes:

  • Remove PHP 4 Constructors
  • Spaceship Operator
  • Replacing current json extension with jsond
  • Skipping Optional Parameters for Functions
  • Constructor behaviour of internal classes
  • Reclassify E_STRICT notices

Each one has a link to the current version of the RFC, the current status and Phil's own opinion of the feature (usually just one word).

tagged: php7 feature freeze rfc list status opinion

Link: https://philsturgeon.uk/php/2015/03/15/php-7-feature-freeze/

Anthony Ferrara:
Scalar Types and PHP
Feb 12, 2015 @ 11:25:47

Anthony Ferrara has tossed his own hat into the ring around the debate that's been going about the RFC for scalar type hints in PHP. In his post he agrees with (most of) the suggestions made in the proposal around strict, weak and the "compromise" of mixed typing.

There's currently a proposal that's under vote to add Pascal Martin's excellent post about it. What I want to talk about is more of an opinion. Why I believe this is the correct approach to the problem.

He starts off talking about the "all strict" angle that some suggested as the proper approach then moves into the "weak argument" explaining the difference between the two. He shares a bit of history around the problems detecting subtle bugs caused by typing issues and how it is definitely a problem that needs solving. Finally, he talks about the mixed-typing compromise and provides some code samples showing a common bug that can happen with weak typing.

tagged: scalar type hint rfc opinion example weak compromise mixedtype

Link: http://blog.ircmaxell.com/2015/02/scalar-types-and-php.html

Pascal Martin:
In favor of RFC "Scalar Type Hints"
Feb 09, 2015 @ 09:40:18

Pascal Martin has a new post today sharing some of his thoughts around one of the currently proposed PHP RFCs for < href="http://blog.pascal-martin.fr/post/in-favor-of-rfc-scalar-type-hints.html">scalar type hinting. PHP has had type hints for custom objects and some things like arrays but this proposal would add in additional ones for things like "string", "int" and "float".

The Scalar Type Hints RFC for PHP 7 has first been initialized in December 2014. It went on with version 0.2 at the middle of January 2015, after changing several major ideas, and is now in version 0.3, integrating return types, as RFC Return Type Declarations has been accepted a few days ago. [...] I’ve been following this RFC (and the previous ones) with some interest, and, as I’ve taken some time to play with it a bit last week, building PHP from the sources of the corresponding Git branch, I’ll try summarizing here why I think it is interesting. Please note this is my personal opinion.

He starts with a look at what the proposal entails around these new scalar type hints and why he thinks they're a good idea. He looks at some of the things that PHP's current weak typing allows and how it has made the language very flexible as a result. He also shows how the proposal suggests the use of the "declare" function to define a strict typing constant to essentially turn on the checking only where needed. He provides a few code snippet example including object/method handling, setting a custom error handler and which of the calls work in which typing method. He finishes the post looking at the "per-file" idea of enabling the strict typing checks and some of his confusion around the point. He also talks about return types, the directives that are proposed to enable the feature and the current status of the RFC.

tagged: scalar type hint rfc summary proposal php7 opinion overview

Link: http://blog.pascal-martin.fr/post/in-favor-of-rfc-scalar-type-hints.html

Stanislav Malyshev:
Objects as keys
Dec 15, 2014 @ 09:18:50

In his latest post Stanislav Malyshev looks at a RFC he's proposed to allow array keys to be objects including some of his thoughts behind the proposal and how he sees it being helpful to the language.

I’m going to put to vote soon another of my RFCs, namely one about “objects as keys“. So, I want to outline the case for it here and address some criticisms and questions raised while discussing it.

He starts off by answering the "why" question, mentioning specially the introduction of things like GMP numbers and how, despite them seeming to work like numbers, other things can be done with them. He talks about how you'd use this functionality "the right way" and how that'd relate back to value objects. He answers a few other questions about the proposal including why it's better than just using __toString or spl_object_hash instead. He spends the rest of the post looking at some of the implementation problems, disadvantages and some of the possible names (function names) for the handling.

tagged: object array key rfc proposal gmp number

Link: http://php100.wordpress.com/2014/12/14/objects-as-keys/