Tag todayilearned

What are Heredoc and Nowdoc?

Most of the time, using a regular string for large outputs is not the optimal solution, especially if the content is spread across multiple lines. There’re several tricks to achieve the desired result with different levels of cleanliness. Instead of…

PHP Variables in strings

There are several methods to write variables in strings in PHP, but one of the cleanest and apparently the fastest is by using the double-quotes notation. To achieve that wrap the desired variable within curly braces and place that inside…

TIL: stdObject custom string keys

Hi there!For quite some time I’ve been using objects in a wrong way. Every time after a json_decode, I was by inertia casting the returned stdObject into an array to use with some more “special” keys. The ones with special…