Phil Sturgeon
philsturgeon.uk · Personal blog · on HN since 2014
Phil Sturgeon, a PHP and API developer, writes about PHP, REST versus GraphQL, OpenAPI, JSON Schema and Markdown.
What HN saysHN links it for PHP history, such as the T_PAAMAYIM_NEKUDOTAYIM error name, and for OpenAPI and JSON Schema incompatibilities.
25HN people shared it
9linked it in comments
24stories submitted
136story points
8 years agolast shared
2014people per year2026
Most-shared posts
- 1T_PAAMAYIM_NEKUDOTAYIM v. Sanity5 people · 7 points · first shared 2017 · discussion on HN
- 2GraphQL vs. REST: Overview3 people · 10 points · first shared 2017 · discussion on HN
- 3OpenAPI and JSON Schema Divergence: Part 12 people · 29 points · first shared 2018 · 6 comments on HN
- 4Why is everyone outraged?2 people · 5 points · first shared 2016 · discussion on HN
- 5PHP 7 Feature Freeze2 people · 5 points · first shared 2015 · discussion on HN
- 6The State of Markdown (2014) – Phil Sturgeon2 people · 4 points · first shared 2014 · discussion on HN
- 7Solving OpenAPI and JSON Schema Divergence2 people · 2 points · first shared 2018 · discussion on HN
- 8Graphql vs rest caching2 people · first shared 2017
- 9A Response to REST Is the New SOAP1 people · 37 points · first shared 2017 · 5 comments on HN
- 10If it aint broke don't fix it. A PHP (horror) story1 people · 17 points · first shared 2015 · 7 comments on HN
- 11The State of Markdown1 people · 6 points · first shared 2014 · discussion on HN
- 12HTTP Documentation with API Blueprint1 people · 3 points · first shared 2015 · discussion on HN
- 13Auto-Incrementing IDs: Giving Your Data Away1 people · 3 points · first shared 2015 · discussion on HN
- 14Laughs with the Google Maps API1 people · 2 points · first shared 2015 · discussion on HN
- 15I was an Extraordinary Alien – For a Week1 people · 2 points · first shared 2014 · discussion on HN
What HN people wrote when they linked it
exclusiv · 2016-10-14
Yes it is comparable to Node. Most benchmarks show PHP with blocking calls against async Node calls. PHP has the tools to do async no problem. I use ReactPHP all the time to do this stuff; it works great for fast scraping.
See an older counter-point with the much slower PHP 5.5:
https://philsturgeon.uk/php/2013/11/12/benchmarking-codswallop-nodejs-…
acemarke · 2019-04-14
Some searching turns up some articles on incompatibilities between OpenAPI and JSON Schema [0] [1], and it's not immediately clear if they fit together well at this point.
We've got some JSON Schema APIs in our services already and are using libs like the Python `json-schema` package to do validation with those. I also briefly experimented with Quicktype [2] to generate some TS types as a proof-of-concept.
We're getting ready to do a pretty big rework of a lot of our services, and I'm interested in any info folks can provide on pros and cons of using OpenAPI vs JSON Schema for API definitions, and tooling around request validation and TS interface / client generation.
[0] https://philsturgeon.uk/api/2018/04/13/openapi-and-json-schema-diverge…
[1] https://github.com/OAI/OpenAPI-Specification/issues/1532
[2] https://quicktype.io/typescript/
ermir · 2019-03-26
This is the same exact reason why PHP double colon errors still include the `T_PAAMAYIM_NEKUDOTAYIM` string somewhere in the error, as various error parsers still look for it even though the error messages have been updated to be clearer. The PHP team can't remove it or it will break tons of error parsers.
https://philsturgeon.uk/php/2013/09/09/t-paamayim-nekudotayim-v-sanity…
xellisx · 2018-08-02
Not as cool as this, but here are some PHP "frameworks" in a tweet (140 characters):
http://www.twitto.org/
https://gist.github.com/mathiasverraes/9046427
https://philsturgeon.uk/php/2009/12/15/Twiny-Framework-the-framework-s…
https://gist.github.com/jeremeamia/2720020
detaro · 2017-07-30
For those that (like me) hadn't heard of it: https://philsturgeon.uk/php/2013/09/09/t-paamayim-nekudotayim-v-sanity…
mpetrovich · 2017-05-22
REST and GraphQL are two completely different things, and one is not a replacement for the other. REST is an architectural concept, whereas GraphQL is a query language spec.
https://philsturgeon.uk/api/2017/01/24/graphql-vs-rest-overview/
derefr · 2017-04-12
The thing about One Special Bigger Request is that it isn't cacheable. GraphQL is no exception: https://philsturgeon.uk/api/2017/01/26/graphql-vs-rest-caching/
If you want network-level caching, you want multiple atomic resource requests. HTTP2 enables this.
foota · 2017-03-01
I've heard this argument often, what behavior are people referring to when they talk about these advantages?
Is this just referring to using semantically correct HTTP status codes for things like caching, or is there more to it that I'm missing?
edit: And also, and perhaps most important, what about REST makes it easier to take advantage of the transport layer's advantages?
edit 2: This article has answered some of my questions and brought more clarity: https://philsturgeon.uk/api/2017/01/26/graphql-vs-rest-caching/
philstu · 2014-12-26
Here's a whole update on the general state of markdown
https://philsturgeon.uk/markdown/2014/11/30/state-of-markdown/