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

  1. 1
    T_PAAMAYIM_NEKUDOTAYIM v. Sanity
    5 people · 7 points · first shared 2017 · discussion on HN
  2. 2
    GraphQL vs. REST: Overview
    3 people · 10 points · first shared 2017 · discussion on HN
  3. 3
    OpenAPI and JSON Schema Divergence: Part 1
    2 people · 29 points · first shared 2018 · 6 comments on HN
  4. 4
    Why is everyone outraged?
    2 people · 5 points · first shared 2016 · discussion on HN
  5. 5
    PHP 7 Feature Freeze
    2 people · 5 points · first shared 2015 · discussion on HN
  6. 6
    The State of Markdown (2014) – Phil Sturgeon
    2 people · 4 points · first shared 2014 · discussion on HN
  7. 7
    Solving OpenAPI and JSON Schema Divergence
    2 people · 2 points · first shared 2018 · discussion on HN
  8. 8
    Graphql vs rest caching
    2 people · first shared 2017
  9. 9
    A Response to REST Is the New SOAP
    1 people · 37 points · first shared 2017 · 5 comments on HN
  10. 10
    If it aint broke don't fix it. A PHP (horror) story
    1 people · 17 points · first shared 2015 · 7 comments on HN
  11. 11
    The State of Markdown
    1 people · 6 points · first shared 2014 · discussion on HN
  12. 12
    HTTP Documentation with API Blueprint
    1 people · 3 points · first shared 2015 · discussion on HN
  13. 13
    Auto-Incrementing IDs: Giving Your Data Away
    1 people · 3 points · first shared 2015 · discussion on HN
  14. 14
    Laughs with the Google Maps API
    1 people · 2 points · first shared 2015 · discussion on HN
  15. 15
    I was an Extraordinary Alien – For a Week
    1 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…
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/

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close