Derick RethansPHP Internals News: Episode 15: base_convert() Improvements (20.6.2019, 08:15 UTC)

PHP Internals News: Episode 15: base_convert() Improvements

In this fifteenth episode of "PHP Internals News" I talk with Scott Dutton (Twitter, GitHub) about his base_convert() Improvements RFC.

The RSS feed for this podcast is https://phpinternals.news/feed.rss, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news

Show Notes

RFC: base_convert() Improvements

Credits

Music: Chipper Doodle v2 — Kevin MacLeod (incompetech.com) — Creative Commons: By Attribution 3.0

Become a Patron!
Link
Voices of the ElePHPantInterview with Woody Gilk (19.6.2019, 20:31 UTC)
Link
Rob AllenPHP Architect: Serverless PHP With Bref, Part 2 (19.6.2019, 10:02 UTC)

Cover 768x994

Part two of my article on using Serverless PHP using Bref has been published! In part one, I introduced Bref as we wrote a simple "Hello World" application.

Part follows this up exploring a more complete serverless application, my Project365 website. This S3 hosted static website is build using a serverless PHP function that connects to the Flickr API to retrieve my my one-photo-per-day images and present them on a single page per year. In the article I show how to use Bref to connect to a 3rd party API and use the AWS PHP SDK to update S3 and invalidate CloudFront caches.

The article is in the June 2019 issue of php[architect]. If you don't have a subscription, now may be a good time to take one out!

Link
Evert Pot431 Request Header Fields Too Large (18.6.2019, 15:00 UTC)

When a client sends a HTTP request with HTTP headers that are too big, a server can use 431 Request Headers Fields Too Large in response.

This response can be used if either the total size of all headers exceeded some limit, or if there are individual headers that are too big.

If a client sees a 431, it could hypothetically remove some headers and try again. The most obvious candidate for this could be removing cookies.

Example

HTTP/1.1 431 Request Headers Too Large
Content-Type text/html

<h1>Too many cookies! Try to reduce your cookie footprint.</h1>

References

Link
Voices of the ElePHPantInterview with Allan MacGregor (18.6.2019, 13:07 UTC)

This episode is sponsored by
Day Camp 4 Developers:Data

The post Interview with Allan MacGregor appeared first on Voices of the ElePHPant.

Link
Evert PotBlog archive in space (17.6.2019, 21:14 UTC)

I’ve been writing articles on this blog for about 13 years, and for a while now I’ve marked all of the 400ish articles with geo tags.

This blog is Jekyll-based. To add Geo tags, all I had to do was add the information to the ‘front-matter’. Here’s the header of a sample post:

title: "Browser tabs are probably the wrong metaphor"
date: "2019-06-11 21:14:00 UTC"
tags:
  - browsers
  - ux
geo: [43.660773, -79.429926]
location: "Bloor St W, Toronto, Canada"

I thought it would be neat to grab all these posts and plot them on a map, so next to my ‘time-based’ archive, I can look at a ‘space-based’ one.

This is how that looks like:

The archive of this blog in space!

Want to check it out? Browse this interactive map

To generate this map, I did two things. First I generated a .kml file. The process for this is basically the same as generating an atom feed for your Jekyll blog. This is how mine looks like:

---
layout: null
---
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
  <Document>
    <name>{{ site.title }}</name>
    <description>
      This map contains a list of locations where I wrote an article on this blog.
    </description>
    <Folder>
      <name>Posts</name>
      {% for post in site.posts %}{% if post.geo  %}
      <Placemark>
        <name>{{ post.title | xml_escape }}</name>
        <Point>
          <coordinates>
          {{ post.geo[1] }},{{ post.geo[0] }},0
          </coordinates>
        </Point>
        <description>https://evertpot.com{{post.url}}</description>
        <atom:link type="text/html" rel="alternate" href="https://evertpot.com{{ post.url }}"/>
      </Placemark>
      {% endif %}{% endfor %}
    </Folder>
  </Document>
</kml>

Lastly, I needed to generate a map page and use the Google maps API to pull in the .kml:

---
layout: 

Truncated by Planet PHP, read more at the original (another 1400 bytes)

Link
Adam CulpSolve problems and stop failing with PHP (15.6.2019, 20:19 UTC)

Imagine living in a 500 square-foot store, in a strip mall. The back half of the business was as expected, with a bathroom, 2 small offices, and work area. The front was a bedroom barely large enough to hold a bed, and a living room barely able to contain a couch and TV. The only thing separating the living room from the sidewalk, and the busy main street, was paper taped onto the floor to ceiling windows. And behind that, some vertical blinds to make it more home-like.

In 1996, that was my life. I was broke, and could no longer afford an apartment, so I moved into the front half of my failing business. I had one employee, who believed in me so much they were willing to donate their spare time to help me because I couldn’t afford to pay them.

Up to that point in my life, I had never made more than $9,000 in a single year. I was a failure, and couldn’t find a way out. I was living by eating a single Subway $5 foot-long sub…each day…for weeks, because that is all I could afford and I didn’t have a kitchen. And friends contributed cigarettes to keep that habit alive.

“I was living on a single Subway $5 foot-long sub…each day”

To top things off, I was experiencing anxiety attacks multiple times each day. After a couple of trips to the emergency room convinced I’d had a heart attack, I finally gave up going there because the bill was already thousands that would continue dragging my credit rating even farther down.

But then, something happened that changed my life as a nurse in the emergency room was asking me general health questions, such as age, height, weight, how much did I smoke/drink? (I answered 2 packs of cigarettes and 2 pots of coffee a day.) She looked at me with caring eyes and asked, “Do you think God intended you to put that much poison into your body?”

For some reason, I’d never thought of my bad habits in that manner, and it made sense to me. So, at that moment I quit smoking and stopped drinking coffee. This caused me to suffer from bronchial spasms severe enough I could visually see my chest quivering despite wearing a shirt, and even more anxiety attacks over the following month.

I moved in with family at the age of 30 and started searching for a job. In northeast Ohio, that is no small task. That area of the country has been abandoned for so long that the population of Youngstown, Ohio has declined from 160,000 in the ’70s to only 60,000’ish in 2017. (http://worldpopulationreview.com/us-cities/youngstown-oh-population/)

Finally, I found a job selling cars for about a year, which paid fairly well. And luckily a friend of my mom offered me a job as a service person with a cabinetry company, which was the best job I’d ever had to that point. I loved it and thrived.

As one part of the job, I generated my own reports allowing me to grow quickly over a couple of years from District manager to Area manager. As I was being considered for Regional manager, the company offered me a job in Florida generating reports for the entire country, which meant I needed to move to Florida. I took it, and in 2000 I moved to West Palm Beach.

This is when I was introduced to programming as the events of 911 caused me to lose my job. In 2002 I started learning to program with PHP and accepted funding from Florida to get some training to learn system administration.

After a job as a system administrator, I decided I liked web programming more and focused on finding a new job doing that.

Over the following years, I continued gaining skills and moved from one job to the next to ensure my level of compensation kept up with my newly acquired skills. I also took up long distance ultra-running, and Judo, as I continued to improve my life and grow personally.

Today, as a senior/architect level web developer, who has also worked as a consultant and now as a developer advocate, I’ve gained much over the past 21 years with many amazing accomplishments.

Maybe I would have achieved these things regardless of the technology used, and PHP enabled me to do it more easily than I think any other programming/scripting language would have. Looking back, it was the approachability of PHP that allowed me to start solving problems quickly and allowed me to continue growing my skills as PHP itself continued to mature.

You may ask, “Why are you sharing this?”. Or you may get the impression I’m bragging. And perhaps that is a little true. But most of all I wish to share 3 thoughts, which is why I am sharing my story in such an open way.

#1 – If you are down on your luck, and struggling to get by. Know that as long as you continue to push forward, great things will eve

Truncated by Planet PHP, read more at the original (another 1176 bytes)

Link
larry@garfieldtech.comI was wrong about PSR-11 (15.6.2019, 19:43 UTC)

I was wrong about PSR-11

Submitted by Larry on 15 June 2019 - 2:43pm

Back in January 2017, the PHP Framework Interoperability Group (FIG) reviewed and passed PSR-11, the "Container Interface" specification. It was a very simplistic 2-method interface for Dependency Injection Containers, which had been worked on for some time by a small group. (This was before FIG had formal Working Groups, but "container-interop" was one of the effectively proto-Working Groups that were floating about.)

PSR-11 passed overwhelmingly, 23 to 1 out of the FIG member projects at the time. The lone holdout was Drupal, for which at the time I was the voting representative.

Two and a half years later, I will say I was wrong, and PSR-11 has been a net-win for PHP.

Continue reading this post on SteemIt.

Link
Voices of the ElePHPantInterview with Vesna Kovach (14.6.2019, 02:30 UTC)
Link
Derick RethansPHP Internals News: Episode 14: __toString() Exceptions (13.6.2019, 08:14 UTC)

PHP Internals News: Episode 14: __toString() Exceptions

In this fourteenth episode of "PHP Internals News" we talk to Nikita Popov (Twitter, GitHub) about a late __toString Exception RFC.

The RSS feed for this podcast is https://phpinternals.news/feed.rss, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news

Credits

Music: Chipper Doodle v2 — Kevin MacLeod (incompetech.com) — Creative Commons: By Attribution 3.0

Become a Patron!
Link
LinksRSS 0.92   RDF 1.
Atom Feed   100% Popoon
PHP5 powered   PEAR
ButtonsPlanet PHP   Planet PHP
Planet PHP