| |||||||
| المدوّنات | البحث | مشاركات اليوم | اجعل كافة المشاركات مقروءة |
|
| | LinkBack | أدوات الموضوع |
| |||||
| اقرأ اسئلة شهادة Zend PHP5 - متجدد الفائدة ...نسخت بعض الاسئلة التي تأتي في الاختبار التجريبي لشركة Zend .. ونرغب من لديه معلومات ان يجيب على الاسئلة من باب الفائدة لنا ..نرجوا من الاخوة الخبراء في PHP عامة و PHP5 .. عند الاجابة اخبارنا سبب اختياره .. لتعم الفائدة من هذه الفكرة .. ======= Which of the following functions were added to PHP 5 for dealing with arrays? array_intersect_key() array_unshift() array_diff_key() array_merge() array_slice() ============== The _________ function is great for monitoring a series of streams to determine when one or more of them will not block a particular type of stream operation. ============== Consider the following String: كود PHP: كود PHP: Consider the following example XML document: كود PHP: The document is completely valid All special XML characters must be represented as entities within the content of a node All tags must be closed You cannot specify a namespace for the <html> attribute The DOCTYPE declaration is malformed ================= اختر 4 اجابات Consider the following script: كود PHP: كود PHP: To ensure that a given object has a particular set of methods, you must provide a method list in the form of an ________ and then attach it as part of your class using the ________ keyword. array, interface interface, implements interface, extends instance, implements access-list, instance ==================== When is it acceptable to store sensitive information in an HTTP cookie? Only under extremely controlled situations When the cookie is sent over a secure HTTP request When it is encrypted It is always acceptable ===================== Given the following array كود PHP: print $a['purple][4][3]; print $a['purple']['hello'][9]; print $a[2][4][3]; print $a[2][4][9]; print $a[4]['hello'][9]; ========================= When an object is serialized, which method will be called, automatically, providing your object with an opportunity to close any resources or otherwise prepare to be serialized? __destroy() __serialize() __destruct() __shutdown() __sleep() ========================= What is the primary benefit of a SAX-based XML parser compared to DOM? All of the above Faster then DOM methods Requires less memory then DOM Easier to develop parsers ========================== اختر 3 اجابات The $_REQUEST super global contains what? Data received from the session Data received from Cookies Data received from the server environment Data received from HTTP POST Data received from HTTP GET ================= What is the output of the following code? كود PHP: Nothing 1 2 =================== Unlike the old MySQL extension, the new MySQLi extension requires that you provide what when performing a query when using the procedural interface? The query identifier The database name All function parameters The database handle The statement handle ================== اختر 3 اجابات What are the three access modifiers that you can use in PHP objects? protected public static private final ============ Given the following XML document in a SimpleXML object: كود PHP: $sxe->body->p[0]->a[1]['href'] $sxe->body->p->a->href $sxe->body->p->a['href'] $sxe['body']['p'][0]['a']['href'] $sxe->body->p[1]->a['href'] =============== One can ensure that headers can always be sent from a PHP script by doing what? Enable header buffering in PHP 5 Set the header.force INI directive to true Enable output buffering in PHP 5 There is no way to ensure that headers can always be set, they must always be checked None of the above ============= What is the best way to ensure that a user-defined function is always passed an object as its single parameter? function myfunction(stdClass $a) function myfunciton($a = stdClass) Use is_object() within the function There is no way to ensure the parameter will be an object function myfunction(Object $a) ============= اختر 4 اجابات Which of the following is incorrect? function c(MyClass $a = new MyClass()) function d($a = null) function e(&$a = 30) function a(&$a = array(10,20,30)) function b($a = (10 + 2)) ============= اضف الكلمة The _________ context variable allows you to define a callback for the stream that will notify your script of certain events during the course of the transaction. ============= The ____________ function is used to modify the amount of time PHP will wait for a stream before timing out during reading or writing. ============== Which php.ini directive should be disabled to prevent the execution of a remote PHP script via an include or require construct? You cannot disable remote PHP script execution curl.enabled allow_remote_url allow_url_fopen allow_require =============== When implementing a permissions system for your Web site, what should always be done with regards to the session? None of the above You should not implement permission systems using sessions Sessions should be cleared of all data and re-populated The session key should be regenerated The session should be destroyed ============== The _______ method will be called automatically when an object is represented as a string. getString() __get() __value() __toString() __getString() ============== Which statement will return the third parameter passed to a function? $argv[3]; $argv[2]; func_get_args(3); func_get_arg(2); func_get_arg(3); ============= اختر 3 اجابات What would go in place of ?????? below to make this script execute without a fatal error? كود PHP: die(); stop(); __halt_compiler(); exit(); ========== The ____ construct is particularly useful to assign your own variable names to values within an array. array_get_variables current each import_variables list ========== Where should indirectly executed PHP scripts (i.e. include files) be stored in the file system? Outside of the Document Root In the document root Anywhere you want In the database ============= اختر 2 اجابة Why is it important from a security perspective to never display PHP error messages directly to the end user, yet always log them? Error messages will contain sensitive session information Error messages can contain cross site scripting attacks Security risks involved in logging are handled by PHP Error messages give the perception of insecurity to the user Error messages can contain data useful to a potential attacker ============== If you would like to store your session in the database, you would do which of the following? -It requires a custom PHP extension to change the session handler -Implement the session_set_save_handler() function -Create functions for each session handling step and use session_set_save_handler() to override PHP's internal settings -Configure the session.save_handler INI directive to your session class ================= اختر 2 اجابة What consistutes a View in the MVC pattern for PHP 5, in the following list? Iterators PDO Classes PHP Smarty ============ Which PCRE regular expression will match the string PhP5-rocks? كود PHP: كود PHP: كود PHP: كود PHP: كود PHP: What should be replaced in the string ??????? below to open the archive myarchive.gz located in the document root of the www.example.com server and decompress it? كود PHP: compress.zlib://http://www.example.com/myarchive.gz compress.http://www.example.com/myarchive.gz compress.http.zlib://www.example.com/myarchive.gz compress.zlib://myarchive.gz ============= Setting a HTTP cookie on the client which is not URL-encoded is done how in PHP 5? Use the setrawcookie() function Set the cookies.urlencode INI directive to false Use urldecode() on the return value of setcookie() Setting the $no_encode parameter of setcookie() to a boolean 'true' All cookies must be URL encoded =============== اختر 3 اجابات Which of the following operations must occur prior to any output being sent to the client (assume output buffering is disabled). Modifying Session Data Processing GET or POST data Manipulating Cookie data Starting a Session Sending HTTP Headers ============ اختر 2 اجابة What kind of information is acquired when profiling a PHP script? A list of all of the op-codes executed by the engine The files and functions and/or parameters which were executed during the PHP script The execution times of files and functions during the PHP script A list of all the variables used in a PHP script A list of errors which have occurred ============ Event-based XML parsing is an example of which parsing model? SAX DOM XML Object Mapping XPath XQuery ============ What is the output of the following code? كود PHP: A fatal error for an uncaught exception "Didn't catch the Exception!" "Didn't catch the Exception!" followed by a fatal error "Caught Exception" =============== اختر 3 اجابات SimpleXML objects can be created from what types of data sources? A String An array A DomDocument object A URI A Database resource =========== What is the output of this code snippet? كود PHP: 0.001 => 'b', .1 => c 0 => 'c' '0.001' => 'b', '0.1' => c' A Syntax Error ============= How can you modify the copy of an object during a clone operation? Put the logic in the object's constructor to alter the values Implment your own function to do object copying Implement the object's __clone() method Implement __get() and __set() methods with the correct logic Implement the __copy() method with the correct logic ================ How could the following PHP 4 code snippet be re-written in PHP 5? كود PHP: You cannot change array value types during interation in PHP 5 $value can be prepended with &, and modified directly In PHP 5 you cannot modify an array during iteration using foreach() None of the above ================ Consider the following code segment: كود PHP: xml_set_callback("xml_start_handler"); xml_set_element_handler($xml, "xml_start_handler", "xml_end_handler"); xml_node_set_handler("xml_start_handler", "xml_end_handler"); xml_node_set_handler("xml_start_handler"); =============== When connecting to a database using PDO, what must be done to ensure that database credentials are not compromised if the connection were to fail? wrap the PDO DSN in a try/catch block to catch any connection exception Use constants in the PDO DSN Place the login credentials in the php.ini file Disable E_STRICT and E_NOTICE error reporting levels ============== هذا والله الموفق ...
| |||||
|
| |||||
|
اول اجابة لهذا السؤال: What is the output of the following code? كود PHP: Nothing ------1 2 ========== الجواب هو 1 لأن الدالة لا تتأثر بفصل الكود بينما الكلاس يتأثر ...
| |||||
|
| |||||
|
السلام عليكم ليس لدي متسع من الوقت صراحة لذلك لم استطيع قراءة جميع الأسئلة سأفتح الباب للاجابات بالنسبه لاجابة السؤال الأول : هذه هي الدوال الجديده التي اضيفت للتعامل مع ال arrays ب php5 array_intersect_key() و array_diff_key() يمكنك قرائة وظائفهم و المزيد عنهم من خلال المانيوال ب php.net
__________________ أحمد عبد الفتاح www.servmix.com المبيعات : info@servmix.com لمراسلتي : engahmed@servmix.com • ليس اليتيم الذى قد مات والده ... بل اليتيم يـتـيـم العلـم و الأدب • | |||||
|
| |||||
|
لا أعلم ! لكن بإذن الله تعالى قريبا أعلم . متابعة بصمت . بالتوفيق للجميع .
__________________ 100 صقر !! يومياتي في تعلم php .. أرحب بالمبتدئين لنتعلم معا والمحترفين ليقدموا النصح والتوجيه .. . سبحان الله وبحمده عدد خلقه .. ورضا نفسه .. وزنة عرشه .. ومداد كلماته . | |||||
|
| |||||
|
أخي ما سيفيدك حاليا هو قراءة ال Certification Guide الخاص بالشهادة و ذلك لكي تتعرف على الموضوعات التي تركز عليها الاختبارات، و من ثم تقوية نفسك فيها. لا تحل أسئلة قبل التعلم حتى لا تشتت معلوماتك.
__________________ إن كلماتنا تبقى عرائس من شمع، حتى إذا متنا في سبيلها دبت فيها الحياة .. سيد قطب | |||||
|
| |||||
|
الله يجزاك خير على الأسئله ...
__________________ موقع مبرّمج - zawyte لا إله إلا الله ,,, محمد رسول الله ,,, أستغفر الله , احفظ الله يحفظك . www.tdwenty.com Domain Is 4 Sale | fahad1ad2 @ hotmail.com | |||||
|
| |||||
| اقتباس:
.. ولكن بعض الاسئلة تكون غير مباشرة ..
| |||||
|
| |||||||||||||||
| اقتباس:
اقتباس:
التعديلات كانت <br> إلى <br /> ، وتضبيط وسم A : كود: <<a href="http://example.org/">http://www.example.org/</a>.> كود: <a href="http://example.org/">http://www.example.org/</a> ![]() اقتباس:
اقتباس:
إذا كان القصد مقبول برمجياً ، فهي It is always acceptable ، ومع ذلك لا أعتقد أن هذه هي الإجابة . صراحة يحيّر السؤال ، لكن أشوف إنه المستخدم بكثرة هو : When it is encrypted . اقتباس:
كود PHP: اقتباس:
اقتباس:
Data received from Cookies Data received from HTTP POST Data received from HTTP GET للمزيد: PHP: $_REQUEST - Manual اقتباس:
اقتباس:
اقتباس:
اقتباس:
function c(MyClass $a = new MyClass()) function b($a = (10 + 2)) اقتباس:
اقتباس:
اقتباس:
اقتباس:
بصراحة هذا اللي قدرت أجاوب عليه اليوم ، واعذرني جداً جداً لتأخيري الرد ، وذلك لأسباب دراسية ومرضية خلال هاليومين :$ .. وأيضاً اعذرني لعدم دقة إجاباتي أو صحة بعضها ، حاول نتساعد فقط ونتشارك المعلومات ، وإذا في شيء معين ممكن نبحث مع بعض حتى كلنا نستفيد إن شاء الله تعالى .. تحياتي، أشرف السمهوري
__________________ [هل] سيتحقق الحلم؟ هذا ما ستخبرنا به الأيام :) .. التعديل الأخير تم بواسطة : أشرف السمهوري بتاريخ 29-05-2008 الساعة 11:24 PM. | |||||||||||||||
|
| |||||
|
العفو أستاذ albanner .. بالمناسبة هنا : اقتباس:
..وإذا في أي نقطة حابب نناقشها أو نوصل بحل لها أو أي شي نبحث مع بعض ما في مشكلة ، فقط اذكر الأمر وإن شاء الله كلنا نبحث مع بعض .. تحياتي، أشرف السمهوري
__________________ [هل] سيتحقق الحلم؟ هذا ما ستخبرنا به الأيام :) .. | |||||
|
| |||||
|
شكرا استاذي .. ==== اعجبتني طريقة جميلة .. وهي BindValue كود PHP: ? = علامة الاستفهام فراغ لجدولة مهمة لما كتب كود PHP: PDO::PARAM_INT اي يجب ان تكون رقم والقيمة رقم 2 اي ( ? ) في الاستعلام بـ PDO::PARAM_STR اي يجب ان تكون حروف بعدها اعطاها امر التالي للتنفيذ ..كود PHP: ..
| |||||
|
| |||||
|
وهذه الطريقة للاستعلام واظهار النتائج ... كود PHP: execute = تنفيذ كود PHP: كود PHP: | |||||
|
| |||||
|
أخوي albanner طمنا ايش سويت في الاختبار ؟ مو اليوم الموعد ولا انا غلطان ؟أتمنى إنك تكون سويت كويس فيه ، منتظر ردك على أحر من الجمر ..تحياتي، أشرف السمهوري
__________________ [هل] سيتحقق الحلم؟ هذا ما ستخبرنا به الأيام :) .. | |||||
|