200-710 Zend Certified Engineer Practice Questions
Prepare for 200-710 with more than an answer.
- Exam fee
- $200 USD
- Time limit
- 90 minutes
- Questions on the exam
- 70
- Passing score
- Not disclosed (scale Not disclosed)
- Level
- Professional
- Valid for
- No expiration
Domains covered on the exam 11
- PHP Basics10%
- Functions10%
- Data Format & Types10%
- Web Features10%
- Object Oriented Programming15%
- Security10%
- I/O8%
- Strings & Patterns10%
- Databases & SQL10%
- Arrays10%
- Error Handling7%
- 1
After performing the following operations:
What will be the value of $a?

Show answer details
Correct answer: C
C
- 2
True or false: you can catch fatal errors (e.g., parse errors, out of memory errors, compilation errors) in PHP 7 using try/catch.
Show answer details
Correct answer: B
B
- 3
What is the output of the following code?

Show answer details
Correct answer: A
A
- 4
Which of the following are valid code snippets? (Choose three.)
Show answer details
Correct answer: B, C, E
B, C, E
B, C, E
B, C, E
- 5
Case Study: E-Commerce Platform Upgrade
An e-commerce company is upgrading its platform from a legacy PHP 5.4 system to PHP 7.1. The system has a central
Productclass and several specialized product types likeBook,Apparel, andElectronic, which all inherit fromProduct. A key task is to refactor the product comparison logic.Current Situation: The
Productclass has acompare()method that uses complexif/elselogic to compare two products. This method has become difficult to maintain. The system also frequently crashes due to type errors, as data from the database is not always in the expected format.Requirements:
- Refactor Comparison Logic: Replace the
compare()method with a more modern, concise solution for use in sorting functions likeusort(). - Improve Type Safety: All methods that interact with the database must use strict type declarations for parameters and return values. For example, a method fetching a product by ID might not find it and should indicate this in a type-safe way.
- Add a New Feature: A new
Shippableinterface must be created with methodsgetWeight()andgetDimensions(). TheApparelandElectronicclasses must implement this interface, but theBookclass (which could represent an ebook) should not.
Which code snippet most effectively implements all of these requirements using PHP 7.1 features?
classDiagram class Product{ +int id +string name +float price +compareTo(Product other) } class Book extends Product class Apparel extends Product class Electronic extends Product interface Shippable{ > +getWeight() : float +getDimensions() : array } Apparel ..|> Shippable Electronic ..|> ShippableShow answer details
Correct answer: B
This solution correctly uses the spaceship operator (
) for concise comparison logic. It uses a nullable return type (?Product) to safely handle cases where a product is not found, a key feature of PHP 7.1. It also correctly implements theShippableinterface on the specified classes, fulfilling all requirements. - Refactor Comparison Logic: Replace the
- 6
What is the output of the following code?

Show answer details
Correct answer: B
B
- 7
An unbuffered database query will (choose two):
Show answer details
Correct answer: A, D
A, D
A, D
- 8
One common security risk is exposing error messages directly in the browser. Which PHP configuration directive can be disabled to prevent this?
Show answer details
Correct answer: C
C
- 9
What is the output of the following code?
Show answer details
Correct answer: C
C
- 10
What is the difference between the spaceship operator ( ) and the strcmpO function?
Show answer details
Correct answer: D
D
