Successfully passed certification to become a Zend certified engineer

At the 1. March I made successfully the examination for which I learned the last few months. As was to be expected, were the questions very, very tricky, but the preparation has paid off.

zce-2017-php-80x80

Preparation

I can anyone recommend before from the Book PHP7 Zend Certification Study Guideto read:

In addition, you should all tests on the page zendexam.com to 80% can successfully answer, then you're ready for the exam.

Sign up for the exam

You can be on the Zend.com login page for the examination , take one then nearby in a testing center of their choice can under strictest conditions.

Annually there is a voucher for the exam RetailMeNot.com, If you're lucky.

PHP: Parse Error: syntax error, unexpected ‘:’, expecting ‘;’ or ‘{‘

The very cryptic error message

Parse Error: syntax error, unexpected ':', expecting ';' or '{'

It is in most cases a PHP7 incompatibility.

The code contains a language feature, What is only available at PHP7:

Return type definitions (Definition of the return value). Example:

function myFuntion($input): array
{
    return ['foo'];
}

This can strength enable, the function must return an array, otherwise an TypeErrror is thrown.

To make the code less PHP version running, muss man die Return Type Definition entfernen:

function myFuntion($input)
{
    return ['foo'];
}

Special case: composer more…

Project: baby taschenrechner.de

The just completed project baby taschenrechner.de deals with the issues relating to the development of the own child:

  • How great my child be in x years
  • My child is like in x years
  • Is my child too hard or too thin
  • What dress size is wear it when?

The Web page is to help parents find out, When you need to buy what dress size, the approaching winter/summer home to have the appropriate.

Parents can thus einschätzne, If the child is too thin or too thick for your age/size/weight ratio.

The following technologies were used for the realization:

Symfony 3, Docker, MySQL, PHP, GIT, Google material design, Amazon AWS

Amazon automatic price adjustment tool

I developed a tool just for a customer, with the one the prices of own goods at Amazon can automatically adapt. In the competition to Goth are determined analyzes reliability and therefore a fair price condition of the product and seller for the goods. There are all the data, about the API are available for the determination of price with used, as e.g.. Seller feedback (Reviews of the dealer), whether Amazon itself sent, Shipping time and much more.

The tool compares the rates between the various Amazon optional platforms in Europe (DE, UK, IT, IT, FR) Platforms but also outside Europe, like Japan or America and händelt the different currencies.

The result can be sent directly to Amazon via the API and the prices will be immediately updated.

Amazon Preisanpassung

Screenshot Preisanpassungs Tool

 

The application is in PHP with symfony 3 written and has a front end with Twitter bootstrap 3 and a MySQL database. There's also a vagrant environment for developing with PHP7. 1 and nginx. Be carried out can the whole thing with a simple XAMPP environment or vagrant virtual box at the customer locally on a PC.

If you are also interested in such a tool, allows you to Contact.

PHP How to debug Segmentation Faults

To Segementation faults, like PHP7 currently occurring in to determine and analyze, can you proceed in the following way

1. Specifying the location for the core dumps

echo '/tmp/coredump_%e_%p' > /proc/sys/kernel/core_pattern

2. enable core dumps in PHP-FPM

in the file: PHP-fpm.conf:

rlimit_core = unlimited     ; vorher: 0

3. Restart PHP FPM

service php-fpm restart

4. Analyzing the core dumps with gdb more…

PHP 7 – the new features at a glance – Part 2

Expectations

Expactations can mark places in your code, which should not be reached actually, But if it is, can leave a message in the production environment, to other programmers to debug and understand the codes to help. The parameter expression is evaluated and a false value will raise an AssertionException thrown.

Definition:

void assert (mixed $expression [, mixed $message]);

The php.ini configuration variable Zend.assertions can 3 Value be more…

PHP 7 – the new features at a glance – Part 1

PHP 7 is on everyone's lips and come with a number of syntactic enhancements and new features. In the future, PHP applications are not only faster, but the Java-language syntax approach further. Finally, you can set, which data types of functions in and which should come out again (Parameter type declarations and return type declarations), Thus the maintainability of the code can be improved.

Parameter type declarations and return type declarations

In PHP >= 5.3. was it previously possible function parameters, an input to assign an object type variable, the function expected, to generate other programmers that use the function to make it easier to document and an exception, When an object of a different type is used: more…