PHP Logging Class
Read more at https://www.phpclasses.org/package/11642-PHP-Log-application-messages-to-files.html#2020-05-08-00:16:10
Here's what was popular in the PHP community one year ago today:
When the world seemingly changed overnight due to COVID-19, it was surreal. Maybe your surroundings looked exactly the same. Your to-do list contained the same projects. Even if things were completely different beneath the surface, it wasn’t easily recognizable.
Now that we’ve all had some time to process quarantines and widespread sickness, it’s starting to hit home. That is, if we and our loved ones are fortunate enough not to have fallen ill.
Personally, I’ve felt a wide range of emotions throughout this period of time. There’s worry and fear regarding the unknown. Gratitude for health and family – not to mention all of those people who are doing their part to save lives and help keep the world moving. Still, as uncertain as things are, it’s easy to feel a sense of despair.
While that’s understandable, it doesn’t have to be a 24/7 feeling. There are indeed some bright spots for those of us in the industry, if you know where to look. With that, here are some things we take solace in.
During a time when the need for accurate information is vital, web designers are playing a key role. We’re helping our clients reach their audience and keeping the world informed.
For the past couple of decades, the web has been replacing or serving as an addendum to the physical world. In a way, that has prepared us to pitch in during a crisis such as this.
That prep time has allowed us to have at least some infrastructure in place to adapt to the rapidly-changing needs of clients. The websites we manage can disseminate information, tie in with third-party services like social media networks and take online transactions. Each of these areas are proving to be crucial during a global pandemic.
This (hopefully) means that there’s no need to start from scratch. In many cases, it’s a matter of augmenting the systems we already have.
The ability to turn on a dime when it’s needed the most is something to be proud of. And each of us has our own role to play.
Businesses all over the world have been impacted by closings, modified hours and loss of revenue. Many have shifted strategies to try and stay afloat during the public health crisis. It’s a difficult situation and one that is likely to last into the foreseeable future.
Out of this uncertainty also comes opportunity. Web designers are in a position to help clients adapt to new ways of doing business. Those who have traditionally run their organization via offline methods will need help going online. Others will likely need to expand current online operations.
In addition, the unique circumstances may result in a new wave of startups. Companies will look to solve new problems that have surfaced and they’ll need an effective website as part of their efforts.
This isn’t to say that the sky is the limit. But if you have the right skillset, or are willing to learn, you could find yourself with a number of projects to tackle.
The web design industry itself is, as always, a bright spot. This is a community, not an everyone-for-themselves affair. That’s something to be very proud of.
Web professionals are continuing to share knowledge and advice. However, that has expanded beyond the typical programming and design tutorials. Some are sharing tips for getting through the pandemic and how to help clients navigate uncharted waters.
There is also a highly-personal element that seems to be missing from a lot of industries. Perhaps that’s because there are so many small businesses, solo entrepreneurs and self-taught individuals involved.
This lends itself well to a lot of situations, but especially a crisis. People are letting us into their homes (virtually, of course) and discussing their experiences. That is highly relatable – regardless of your age, gender or nationality.
The human element is part of what makes this a special community. It’s something we can all lean on, even when there’s chaos all around us.
Despite a challenging environment, those of us in the web design industry have plenty of reasons to be thankful. Maybe things aren’t the same, but there’s still an opportunity to thrive and be of service to others. That’s something not a lot of people can say right now.
Yes, there’s a heavy weight on everyone’s shoulders. But you don’t have to look far to find some positives.
The post Reasons to Be Thankful: Bright Spots for Web Designers appeared first on Speckyboy Design Magazine.
In this episode of "PHP Internals News" I talk with George Banyard (Website, Twitter, GitHub, GitLab) about an RFC that he has proposed together with Máté Kocsis (Twitter, GitHub, LinkedIn) to make PHP's float to string logic no longer use locales.
The RSS feed for this podcast is https://derickrethans.nl/feed-phpinternalsnews.xml, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news
Hi, I'm Derick. And this is PHP internals news, a weekly podcast dedicated to demystifying the development of the PHP language. This is Episode 52. Today I'm talking with George Banyard about an RFC that he's made together with Mate Kocsis. This RFC is titled locale independent floats to string. Hello, George, would you please introduce yourself?
Hello, I'm George Peter Banyard. I'm a student at Imperial College and I work on PHP in my free time.
All right, so we're talking about local independent floats. What is the problem here?
Currently when you do a float to string conversion, so all casting or displaying a float, the conversion will depend on like the current local. So instead of always using like the decimal dot separator. For example, if you have like a German or the French locale enabled, it will use like a comma to separate like the decimals.
Okay, I can understand that that could be a bit confusing. What are these locales exactly?
So locales, which are more or less C locales, which PHP exposes to user land is a way how to change a bunch of rules on how string and like stuff gets displayed on the C level. One of the issues with it is that like it's global. For example, if you use like a thread safe API, if you use the thread safe PHP version, then set_locale() is not thread safe, so we'll just like impact other threads where you're using it.
So a locale is a set of rules to format specific things with floating point numbers being one of them in which situations does the locale influence the display a floating point numbers in every situation in PHP or only in some?
Yes, it only impacts like certain aspects, which is quite surprising. So a string cast will affect it the strval() function, vardump(), and debug_zval_dump() will all affect the decimal locator and also printf() with the percentage lowercase F, but that's expected because it's locale aware compared to the capital F modifier.
But it doesn't, for example, have the same problem in the serialised function or say var_export().
Yeah, and json_encode() also doesn't do that. PDO has special code which handles also this so that like all the PDO drivers get like a constant treat like float string, because that could like impact on the databases.
How is it a problem that with some locales enabled and then uses a comma instead of the decimal point. How can this cause bugs and PHP applications?
Truncated by Planet PHP, read more at the original (another 17468 bytes)
In this episode of "PHP Internals News" I talk with George Banyard (Website, Twitter, GitHub, GitLab) about an RFC that he has proposed together with Máté Kocsis (Twitter, GitHub, LinkedIn) to make PHP's float to string logic no longer use locales.
The RSS feed for this podcast is https://derickrethans.nl/feed-phpinternalsnews.xml, you can download this episode's MP3 file, and it's available on Spotify and iTunes. There is a dedicated website: https://phpinternals.news
Hi, I'm Derick. And this is PHP internals news, a weekly podcast dedicated to demystifying the development of the PHP language. This is Episode 52. Today I'm talking with George Banyard about an RFC that he's made together with Mate Kocsis. This RFC is titled locale independent floats to string. Hello, George, would you please introduce yourself?
Hello, I'm George Peter Banyard. I'm a student at Imperial College and I work on PHP in my free time.
All right, so we're talking about local independent floats. What is the problem here?
Currently when you do a float to string conversion, so all casting or displaying a float, the conversion will depend on like the current local. So instead of always using like the decimal dot separator. For example, if you have like a German or the French locale enabled, it will use like a comma to separate like the decimals.
Okay, I can understand that that could be a bit confusing. What are these locales exactly?
So locales, which are more or less C locales, which PHP exposes to user land is a way how to change a bunch of rules on how string and like stuff gets displayed on the C level. One of the issues with it is that like it's global. For example, if you use like a thread safe API, if you use the thread safe PHP version, then set_locale() is not thread safe, so we'll just like impact other threads where you're using it.
So a locale is a set of rules to format specific things with floating point numbers being one of them in which situations does the locale influence the display a floating point numbers in every situation in PHP or only in some?
Yes, it only impacts like certain aspects, which is quite surprising. So a string cast will affect it the strval() function, vardump(), and debug_zval_dump() will all affect the decimal locator and also printf() with the percentage lowercase F, but that's expected because it's locale aware compared to the capital F modifier.
But it doesn't, for example, have the same problem in the serialised function or say var_export().
Yeah, and json_encode() also doesn't do that. PDO has special code which handles also this so that like all the PDO drivers get like a constant treat like float string, because that could like impact on the databases.
How is it a problem that with some locales enabled and then uses a comma instead of the decimal point. How can this cause bugs and PHP applications?
Truncated by Planet PHP, read more at the original (another 17465 bytes)
Have you ever noticed that most freelance web design advice is related to gaining new clients? Well, today is a bit different. Instead of rehashing all the old strategies for increasing business, let’s talk about what happens when a client heads out the door.
You might wonder why we’d ever want to talk about such a thing. It can be depressing, after all. But it’s actually an important topic.
If you’re around long enough, you’ll undoubtedly see clients come and go. In some instances, you’ll know it’s coming. Others may be a complete surprise. Regardless, you’ll want to know how to deal with the situation.
So, let’s review some strategies for dealing with your soon-to-be-ex, along with the potential impact to your business.
Depending on the specific client and the revenue they produce, losing them will either make you stress out or jump for joy. But no matter how you feel inside, it’s important to handle it like a professional. This is part of the natural ebb and flow of being in business.
In most cases, a client leaving is not the result of some personal vendetta (more on that later). But even if it were, staying cordial will make the transition go more smoothly. That’s really a best-case scenario for everyone involved.
When bridges are burned, things can get unnecessarily messy. Tasks like transferring domains or files become twice as difficult, as neither party feels motivated to cooperate. This only serves to prolong an awkward situation.
Therefore, this is a time to swallow your pride and help usher your client to their next stop.
Once in a while, you might find the reasons behind a client’s departure to be obvious. Something like a major disagreement or breach of contract come to mind. But, more often than not, things aren’t so cut and dry.
If the reason hasn’t been stated, it’s okay to ask. Just do so in a polite way (and not like those annoying customer service reps who won’t let you off the phone).
People will leave for a variety of reasons – and it might not have much to do with the level of service you provided. They may be looking to cut costs, switch to one of those awful build-it-yourself services or are being swallowed up by a bigger company. The decision may well have been beyond their control.
Still, you do want to be prepared to receive a hard truth. No one wants to hear that a client was unsatisfied with our work. But it’s still vital information to have. Knowing what went wrong can be both humbling and a great learning experience.
Unless your client is completely going out of business, there will probably be some tasks to take care of before they officially leave. Things like domain accounts, site files and software licensing info are among the most common. It’s kind of like helping the person who was once your significant other pack their bags – only you (thankfully) don’t have to be in the same house with them.
It can be a very awkward situation. Just having to communicate with a client who is moving on is challenging. But then there are instances when a new designer may become involved, making things even more surreal.
Again, it’s best to keep things as professional as you can. Try and provide whatever is needed (within reason). The goal is to get them out the door so that you can get your focus back on existing clients.
Of course, this is assuming the client doesn’t owe you any money. If they tend not to pay their bills on time, it might be a good idea to demand payment up front. Otherwise, you’ll probably never see that cash without going through a collections process.
The impact of losing a client on your business should not get lost in the shuffle. After all, it’s money out of your pocket and a hole in your schedule.
Still, not every loss should be counted equally. It stands to reason that the bigger the client, the more it will affect your bottom line. Thus, it’s more revenue you’ll have to recoup from other sources.
If the client was one of the pillars propping up your design business, losing them presents a huge challenge. Maybe even an existential one. That’s why it’s important to assess the damage.
Take a look at where you stand now and what the future looks like without said client in tow. From there, you can determine what it will take to get back to where you were – or, at least to the point of keeping your business sustainable.
Thankfully, smaller clients are much easier to supplant than big ones. But either way, it’s good to know where you are and have a plan for the future.
As hard as it may be to accept, not everyone will be a “forever” client. It’s one of the more difficult parts of running a business to grasp. But it actually can become easier to deal with over time. You’ll start to see it as just another obstacle in the road to success.
But it also brings up another point: Don’t put all of your eggs in one basket. Try to build as much diversity into your revenue stream as possible. Configure your business so that the loss of one client doesn’t put you on the street.
Easier said than done, of course. When first starting out as a freelancer, that one big project may be the thing that puts you over the top. And that’s great.
It’s just that you won’t want things to stay that way over the long term. Instead, look for ways to add as many of those aforementioned “pillar” clients as you can. That, in turn, will make dealing with the loss of a client much easier on all fronts.
The post What to Do When a Web Design Client Leaves appeared first on Speckyboy Design Magazine.