Which of the following are examples of the new engine executor models available in PHP 5?It has been nicely described on Zend Devzone.
- Switch
- Conditional
- Goto
- Call
- Dynamic
Web Developer's daily adventures in the technologies jungle.
XHTML, CSS, XML, XSL, XPATH, PHP, SQL, JS and Typo3
Tuesday, June 30, 2009
Zend Engine Executor Models in PHP 5
Yet another tricky question from the Zend PHP 5 Certification Mock Exam. It took some time to find it, so I thought it might be worth to put it here. Correct answers are in bold.
Sunday, June 28, 2009
Zend PHP 5 Certification Mock Exam: SQLite
I came across this tricky question while solving the PHP 5 Certificatin Mock Exam. The answers in bold are the correct ones. I have also added a few words of explanation to each of them.
Which of the following SQL statements will improve SQLite write performance?
- PRAGMA locking_mode = "Row";
locking_mode can only be "NORMAL" or "EXCLUSIVE"- PRAGMA count_changes = Off;
it is believed to increase the speed slightly- PRAGMA default_synchronous = Off;
synchronous set to "Off" makes SQLite continue after write operation without waiting for the storage to finish writing - this might give a real boost- PRAGMA default_synchronous = On;
synchronous can only be "OFF", "NORMAL" or "FULL"- PRAGMA locking_mode = "Table";
locking_mode can only be "NORMAL" or "EXCLUSIVE"
Thursday, June 25, 2009
Most Useful Apps from Cydia
My Cydia selection:
- OpenSSH
allows you to access your iPhone filesystem remotely, you should change password for root and mobile users as soon as possible after installing it - Mobile Substrate
allows to hook functionality into existing application, eg. make VoIP calls from Skype on 3g - VoIPover3G
relays on Mobile Substrate, tricks applications into using VoIP over 3g, eg. Skype - CyDelete
allows to delete Cydia apps directly from SpringBoard just like AppStore apps - Siphon
VoIP SIP client for iPhone, works fine with voipdiscount.com
Jailbroken iPhone OS 3.0 is out!
This is some really cool news. The guys have already published Pwnage Tool for iPhone OS 3.0. The process is same as before. If you have pwned your iPhone before you would be familiar with it. I do it as follows and it works for me every time:
- I download the Pwnage Tool from original website
- When I connect my iPhone to my Mac, iTunes starts screaming about new firmware. I choose "download only"
- When the firmware is already on my machine, I run Pwnage Tool in simple mode, it finds the firmware and creates pwned one on my Desktop
- Meanwhile I create a backup copy of my iPhone using iTunes - this point is crucial if you want to preserve your data
- When it's all done I quit iTunes
- Then I put my iPhone into DFU mode using Pwnage Tool and follow the instructions (quit Pwnage Tool).
- I open iTunes and it says about iPhone i recovery mode. It is all right and I press and hold Alt + Option while clicking "Restore" in iTunes
- iTunes shows a dialog allowing me to choose the firmware file - I select newly created pwned firmware
- iTunes uploads the firmware and reactivates iPhone
- I restore my data from backup copy created in point 4.
- I am happy and relaxed
Tuesday, June 23, 2009
Cross-Site Scripting (XSS)
Today I came across a question: "what is most important when trying to prevent a cross-site scripting attack?"
The answer is most intuitive. The most important rule to prevent cross-site scripting is "never trust user input". Not far behind comes "escape output".
These are general server-side programming rules, they do not apply only to specific language, like PHP.
Identity in PHP4 and PHP5
Subscribe to:
Posts (Atom)