I would like to share with you a couple of functions that use a lot and I consider them quite useful.
Read the rest
When I was programming today I got into a small problem, which I quickly solved, but it gave me a very good idea for a tutorial. Namely, what happened to me? I worked on an easy loop through array with use of functions current and next. I created custom array with custom values, and when I started the code, I did not get what I’ve expected.
Read the rest
PHP supports two ways of reporting the problem in the code. Errors and exceptions . What’s the difference then?
First at all, exceptions are object-oriented way of processing errors, while error are procedural (using functions) way of reporting the problem. Which of them is better to use? Definitely exceptions, as they offer much more control over the code. PHP has a standard class Exception, which can be extended.
Read the rest