0v1.ro

(zero V unu)

Category Archives: PHP

PHP related articles. A small ZCE resource archive based on the exam topics. Common solutions to your PHP problems

Compare strings in PHP

Just read a comment in the PHP documentation and had another PHP madness moment. It seems you have to be really, really careful when comparing strings that include numbers…   Command \ PHP Version 7.0.0 – 7.1.3 5.4.4 – 5.6.30 … Read more »

PHP switch case after default works normally

When you put the a case block after the default block the switch will work normally and fallback to the default only after testing all cases. The documentation doesn’t specify this directly, but there is a note with an example. … Read more »

How Tor works

Great photos explaining what is disclosed at each point when doing a request on the web, with or without Tor or HTTPS. The photo is provided by the EFF https://www.eff.org/pages/tor-and-https

Strings array access issue

What would you expect for this script to output?

Maybe a notice? maybe some false there.. But if you have in mind PHP logic.. you surely know.. So, $text is a string and string characters can be accessed with … Read more »

Foreach with reference

If you iterate over an array with & you should unset the value variable after to not modify the array accidentally after.

Should do like this

PHP echo print question

Working with echo or print is very easy in PHP. At the begining it might be harder to understand concatenations or operations order, but after you master them is really easy. But there are some cases where you wonder how … Read more »

Regex

Documentation Cheatsheet: Dave Child, Dzone, RegexOne Tools: (Online) RegExr, Regex101, RagexPal, RegexPlanet, (Offline) Rad Software (free) or RegexBuddy (paid)

Zend Certified PHP Engineer Exam

In a competitive environment as the programming world is this kind of certification can help you differentiate yourself when you are looking for a job. You might want a bigger salary, you want to improve your CV, the certification is … Read more »