M
M
max_mara2013-05-13 20:55:58
Zend Framework
max_mara, 2013-05-13 20:55:58

Zend PHP Certification need advice?

Thought up here suddenly to receive this certificate for show.
I found this wonderful manual
static.zend.com/topics/PHP-5-3-Study-Guide-v1.pdf
Let's discuss some questions here
On page 27, question number 7 misled me.
Your PHP program periodically parses the 50Kb of data received from the remote web service and outputs it in readable HTML form. But your favorite users, who are always right, complain that the script takes a very long time to load. Which of the following options will help make your service faster (Choose two)?
a) Install an op-code cacher
b) Install an SSD
c) Cache data returned from a remote web service
d) Update to the latest PHP version
The answers advise choosing C, D, although I would choose A and C (and then C, depending on specific conditions). It is clear that SSD is definitely not an option here. How should one think in order to answer such questions correctly?
And why did they think they needed to upgrade to the latest version? After all, the PHP version is not specified in the conditions.
Further on page 47 question number 1

<?xml version="1.0" encoding="UTF-8"?><br>
<node><br>
    <?var type="string" ?><br>
    <leaf>value</leaf><br>
</node><br>
<?xml version="1.0" encoding="UTF-8"?><br>
<node><br>
    <?var type="string" ?><br>
    <leaf>value</leaf><br>
</node><br>

What is wrong with this code? They say nothing. But either they have a mistake in the question, or the skis do not go.
And what other tricky questions can be on the test?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
E
edogs, 2013-05-13
@max_mara

And what other tricky questions can be on the test?
Very different: \ Expect that about 20% of the questions in the test will be those that you did not expect even after reading all the literature for preparation. But there are 2 hopes - firstly, to pass the test, you do not need to knock out 100%; secondly, to pass the test, it is enough in general and good experience in the language.
By 27.7.
You have to choose 2 answers. C and D, in principle, really seem to be the most correct. There is only 50kb, and one operation is parsing. C is obvious. But between A and D, most likely, you need to choose D, because most likely a more recent version of the parser will give more efficiency than the opcode cacher, the plug is most likely in the parsing operation, and not in the script warmup.
If there were 3 options, A,C,D should have been chosen. Well, if we assume that there is not only 1 script on the server, then in general, the ssd will not hurt if there are 4 answer options :) That is, it's a matter of priorities - what is more important, what is more likely.
According to 47.1
Perhaps the eye is blurred, but what is wrong with it?

V
Vyacheslav Slinko, 2013-05-13
@KeepYourMind

I don’t remember such tricky questions on the test.

a) Install op-code cache

Not an option, because the drawdown in speed that users can notice cannot occur due to a sudden bloat in the sources.
b) Install SSD

Not an option, because data is most likely not written to disk.
c) Cache data returned from a remote web service

Option, because remote services always slow down.
d) Update to the latest PHP version

Always a variant, each new version is faster than the previous one :)
However, I'm sure this answer does not have a high impact priority.
Further on page 47 question number 1

Most likely a bug, because there cannot be 2 root elements in XML.
If the bug is in duplication, then yes, everything is ok with xml - stackoverflow.com/questions/7923731/saw-var-type-string-in-an-xml-string-but-what-does-this-mean

E
egorinsk, 2013-05-14
@egorinsk

Obviously, the bottleneck here is access to a remote service. Anyone who has used the Internet knows that websites tend to sometimes slow down and load slowly, and sometimes they don't work at all. Therefore, you need to choose option C.
But updating to the latest version is not always good, there may be bugs.

D
Domini, 2013-05-15
@Domini

> a) Set up an op-code cacher
The question doesn't clearly state that it's a web service and not a cli, where the op-code cacher is less than completely useless. With such a setting, I would, as advised, give preference to option D, and not A.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question