The Delicious Brains blog has an interesting post, the second part of a series, talking about staying healthy - both mentally and physically - while working from home. In this new article several people share their own ideas, habits and experiences that have helped them keep up while being a part of a remote team.

It’s been just over a year since we posted about our struggles to stay healthy whilst working from home in a remote team. In that time we’ve had two new members join the team, one full company meetup and one regional, one new baby, two engagements and three home moves, so I thought it was about time we give an update on where we are with our health. Ian did promise an update 6 months after the last, but don’t hold it against him.

He post shares thoughts and comments from eight different people, each with their own unique experiences and recommendations (what works for some doesn't for others). Most of the suggestions include recommendations of regular exercise, making mental health a priority and better sleep habits.

In this new post to DZone.com today Giorgio Sironi takes a look at the serializing functionality in PHP and how it works with both regular variables and objects.

PHP is able to automatically serialize most of its variables to strings - letting you save them into storage like $_SESSION. However, there are some tweaks you have to know to avoid exploding .php scripts and performance problems.

He gives some code snippets showing the serialization of variables and objects and points out a few things that can't be effectively serialized (like resources and closures). The mentions the "__sleep" and "__wakeup" magic methods for automatic class serialization and mentions the Serializable interface that comes built in to PHP.

Justin Carmony has a recent post to his blog about a problem he came across where his exception was being thrown with a line number of zero - cause for some investigation.

Today I ran into a problem where my PHP Application would throw this fatal error: "Fatal error: Exception thrown without a stack frame in Unknown on line 0". Which is so much fun, because it doesn’t have a line number, so I had no direction as to what exactly was causing the problem.

He found a blog post that helped him track down the issue that, as it turns out, with serializing objects into the session and an error in the __sleep method.

Dave Gardner has posted about a method he uses to cache objects that have dependency injection needs in something like a memcached server.

The objects themselves have a number of injected dependencies. It includes using the PHP magic methods __sleep and __wakeup to manage serialisation. It also discusses mechanisms for re-injecting dependencies on wakeup via a method that maintains Inversion of Control (IoC).

He uses a user object based example that has an injection needed to load in the user's usage history. He includes the code to define the classes, create the objects via a dependency injection container and performing the sleep/wakeup actions with the dependencies coming out intact on the other side.

DevShed has posted the next part of their series looking at the "magic functions" that PHP5+ has to offer you in your development. They've already looked at ones like __call, __clone and __isset/__unset and now, with this new tutorial they've added __sleep and __wake.

Magic functions are an important part of the numerous improvements and additions that were introduced originally in PHP 5. They can be extremely handy when it comes to simplifying the execution of complex tasks. [...] In this fourth chapter I'm going to examine closely the "__sleep()" and "__wakeup()" functions, which are called automatically when an object is serialized and unserialized respectively.

In their example code they add the __sleep and __wake functions to the class they've been developing to output a string when the object is manipulated. These methods are automatically called when a serialize/unserialize function call is made on the object.

Terry Chay made some remarks to my last blog entry about a solution for lazy class loading without using __autoload(). Some of his statements seem like I explained my implementation not good enough leading to wrong interpretations. In this blog entry I'll use some of his statements to take a deeper look into my implementation and show that he has drawed some conclusions which I want to disprove.

He goes back and corrects some of what Terry has said in his response, including showing a more detailed version of him implementation. Be sure to check out the comments for the post, though - Terry comes back and clarifies some of the comments he'd made including the framework talk and changes of perspective having seen the new code snippet/information.

Terry Chay made some remarks to my last blog entry about a solution for lazy class loading without using __autoload(). Some of his statements seem like I explained my implementation not good enough leading to wrong interpretations. In this blog entry I'll use some of his statements to take a deeper look into my implementation and show that he has drawed some conclusions which I want to disprove.

He goes back and corrects some of what Terry has said in his response, including showing a more detailed version of him implementation. Be sure to check out the comments for the post, though - Terry comes back and clarifies some of the comments he'd made including the framework talk and changes of perspective having seen the new code snippet/information.

DevShed continues their "serializing objects" series today with part two of the series, highlighting the use of the sleep and wakeup functionality of PHP to help with the serialization.

After refreshing the concepts that I deployed in the first part of this series, it's time to focus on the topics that I'll cover in this article, so you'll know what to expect before you continue reading. In this second part, I'll explain how to use objects in conjunction with the "__sleep()" and "__wakeup() magic functions respectively, in order to get the most out of them.

They start with a look at defining self-saving objects with their ObjectSaver class developed earlier. Building on that reminder, they integrate the "__sleep()" and "__wakeup()" functionality to handle calls immediately before and immediately after the handling of the object. They then use this new functionality to create persistent objects, capable of maintaining values across page requests.

DevShed continues their "serializing objects" series today with part two of the series, highlighting the use of the sleep and wakeup functionality of PHP to help with the serialization.

After refreshing the concepts that I deployed in the first part of this series, it's time to focus on the topics that I'll cover in this article, so you'll know what to expect before you continue reading. In this second part, I'll explain how to use objects in conjunction with the "__sleep()" and "__wakeup() magic functions respectively, in order to get the most out of them.

They start with a look at defining self-saving objects with their ObjectSaver class developed earlier. Building on that reminder, they integrate the "__sleep()" and "__wakeup()" functionality to handle calls immediately before and immediately after the handling of the object. They then use this new functionality to create persistent objects, capable of maintaining values across page requests.