PHP Init Style Status Message

Yesterday I talked about created SUCCESS and FAILED status messages in a Bash script (Bash Script Init Style Status Message). Well, on occasion I use PHP for shell/system scripting and of course I thought it would be nice to incorporate my new status messages in those scripts as well. Turns out that it was quite easy to port over.

The Functions

You can simply include the following functions in your PHP script/class.

If you read my previous article then you can readily see that the code is almost verbatim, it just uses PHP syntax instead of Bash.


The above functions were taken out of a class that I was using. If you wanted to include these functions in your class then you could simply call them as follows:

Well, I hope you can find some use for these functions and thank you so much for stopping by! Please leave comments below (if you have any).