Becoming A Zend Certified PHP Engineer

I passed the Zend PHP Certification in 22th Sep 2015. My profile has been added to the Zend Yellow Page and I am now an official Zend Certified PHP Engineer. Let’s get on: is it worth ? A way of confirming your skills A way to review and extend your knowledge A way to increase your profile (Zend allows Certified …

Continue reading

ZCE – Object Oriented Programming

PROPERTIES & METHODS: Invalid property declaration (dynamic variables (., $, self, CONSTANT, $this)) Valid property declarations: number, string, null, array Visibility keywords: PUBLIC, PRIVATE, PROTECTED Property declare can be assign a constant outside of class (ex:defined(‘C’,’X’)) If you declare a property using var instead of one of public, protected, or private, then PHP 5 will treat the property as if it …

Continue reading

PHP Interview Topics

Class and Object and Instance Class is a construct that defines a collection of properties and methods. Class is a “template” / “blueprint” that is used to create objects. Object is instance of class or variable of class. An object stores its state in fields and exposes its behavior through methods. An instance is a unique copy of a …

Continue reading

ZCE – Security

Configurations: error_reporting = E_ALL & ~E_DEPRECATED; (when coding, enable also E_STRICT) to disable error reporting entirely on the running code (display_errors = off; log_errors = on; error_log=$path;) allow_url_include = off; allow_url_fopen = off (on by default) – network resources will still be accessible through fsockopen or CURL functions.; expose_php= off; in php.ini file, the amount of information available …

Continue reading

ZCE – PHP BASICS

Syntax Operators Variables Control Structures Language Constructs and Functions Constants Namespaces * Extensions Configuration Performance/bytecode caching * Syntax:  Standard Tags: <?php … ?> Short Tags: <? … ?> Script Tags: <script language=“php”> … </script> ASP-Style Tags: <% … %> short echo tag <?= is always recognized and valid, regardless of the short_open_tag setting asp_tags = 0, short_open_tag = 1 …

Continue reading

PHP String – Curly Braces

Any scalar variable, array element or object property with a string representation can be included via this syntax. Simply write the expression the same way as it would appear outside the string, and then wrap it in { and }. Since { can not be escaped, this syntax will only be recognised when the $ immediately follows the {. Use {\$ to get a literal {$. Some examples to …

Continue reading

PHP Types – Floating point numbers

Additionally, rational numbers that are exactly representable as floating point numbers in base 10, like 0.1 or 0.7, do not have an exact representation as floating point numbers in base 2, which is used internally, no matter the size of the mantissa. Hence, they cannot be converted into their internal binary counterparts without a small …

Continue reading