صفحة 1 من 2 12 الأخيرةالأخيرة
النتائج 1 إلى 15 من 18

الموضوع: اقرأ اسئلة شهادة Zend PHP5 - متجدد الفائدة

  1. #1
    عضو سوبر نشيط
    تاريخ التسجيل
    Oct 2003
    المشاركات
    718

    اقرأ اسئلة شهادة 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:
    $string "John\tMark\nTed\tLarry"
    Which of the following functions would best parse the string above by the tab (\t) and newline (\n) characters?

    كود PHP:
    strsplit($string"\t\n");  
    strtok($string"\t\n");  
    strstr($string"\t\n");  
    explode("\t\n"$string);  
    All of the above 
    ================
    Consider the following example XML document:


    كود PHP:
    <?xml version="1.0" encoding="ISO-8859-1" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>  <title>XML Example</title> </head> <body>  <p>   Moved to <<a href="http://example.org/">http://www.example.org/</a>.>   <br>  </p> </body></html>
    What is wrong with this document, and how can it be corrected?

    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
    try {
      
    $dbh = new PDO("sqlite::memory:");
    } catch(
    PDOException $e) {
      print 
    $e->getMessage();
    }
    $dbh->query("CREATE TABLE foo(id INT)");
    $stmt $dbh->prepare("INSERT INTO foo VALUES(:value)");
    $value null;
    $data = array(1,2,3,4,5);
    $stmt->bindParam(":value"$value);
    /* ?????? */
    try {
      foreach(
    $data as $value) {
        
    /* ????? */
      
    }} catch(PDOException $e) {
      
    /* ??????? */
    }
    /* ?????? */
    ?>
    What lines of code need to go into the missing places above in order for this script to function properly and insert the data into the database safely?

    كود PHP:
    $dbh->beginTransaction();  
    $dbh->commit();  
    $stmt->execute();  
    $dbh->rollback();  
    $dbh->query($stmt); 
    =====================
    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:
    <?php
    $a 
    = array(  => 'red',  'green',  'blue',  'purple' => array(    'house' => 'dog',    'food' => 'meal',    'here' => 'gone',    'hello' => array(      => 'goodbye',      => 'something',      'correct')));
    ?>
    Which of the following print statements will output the string "correct"?

    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:
    <?php
    function functionSplit(){
      
    $pre 1;
    ?>
    <?php
      
    echo $pre;
    }
    functionSplit();
    ?>
    Error; function declarations can not be split over multiple PHP segments.
    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:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE html
         PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
        <title>XML Example</title>
      </head>
      <body>
        <p>
          Moved to &lt;<a href="http://example.org/">http://www.example.org/</a>.&gt;
          <br/>
        </p>
      </body></html>
    Select the proper statement below which will display the HREF attribute of the anchor tag.

    $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:
    <?php
    $a 
    1;
    $b 0;
    ??????
    $c $a $b;
    ?>
    quit();
    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:
    /^[hp1-5]*\-.*/
    كود PHP:
    /[hp1-5]*\-.?/ 
    كود PHP:
    /[hp][1-5]*\-.*/ 
    [PHP]/
    كود PHP:
    {3}[1-5]{2,3}\-.*$/ 
    كود PHP:
    /[a-z1-5\-]*/ 
    =============
    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:
    <?php
    $file 
    '???????';
    $fr fopen($file'rb');
    $data "";
    while(!
    feof($fr)) 
    {
        
    $data .= fgets($fr1024);
    }
    fclose($fr);
    ?>
    compress.zlib://{$http}www.example.com/myarchive.gz
    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:
    <?php
    class MyException extends Exception {
    }
    class 
    AnotherException extends MyException {
    }
    class 
    Foo {  
    public function 
    something() {
        throw new 
    AnotherException();
      }
      public function 
    somethingElse() {
        throw new 
    MyException();
      }
    }
    $a = new Foo();
    try {
      try {
        
    $a->something();
          } 
    catch(
    AnotherException $e) {
        
    $a->somethingElse();
          }
     catch(
    MyException $e) {
        print 
    "Caught Exception";
      }
    } catch(
    Exception $e) {
      print 
    "Didn't catch the Exception!";
    }
    ?>
    "Caught Exception" followed by "Didn't catch the Exception!"
    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:
    <?php
    $a 
    = array(0.001 => 'b'.1 => 'c');
    print_r($a);
    ?>
    An empty array
    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:
    <?php
    $arr 
    = array('foo' => 5=> 'hi'=> 8);
    foreach(
    $arr as $key => $value) {
        if(
    $key == 2) {
              
    $arr[$key] = 10;
        }
    }
    ?>
    $arr[$key] is no longer necessary, use $arr instead to modify a value
    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:
    <?php.
    $xmldata = <<< XML
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE html
         PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
        <title>XML Example</title>
      </head>
      <body>
        <p>
          Moved to &lt;<a href="http://example.org/">http://www.example.org/</a>.&gt;
          <br/>
        </p>
      </body></html>XML;
    $xml = xml_parser_create("UTF-8");
    /* ??????? */
    xml_parse(
    $xml$xmldata);
    function xml_start_handler(
    $xml$tag$attributes) {
        print "Tag: 
    $tag<br/>\n";
    }
    function xml_end_handler(
    $xml$tag)
     {
    }
    ?>
    What should be placed in place of ?????? above to have the above script display the name of each tag within the XML document?

    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
    ==============
    هذا والله الموفق ...





    __________________
    أخي [ محمد الفارس ] في كل رد اقول .. شكراً لك ...
    البانر.نت .. نصنع من الافكار دليل


  2. #2
    عضو سوبر نشيط
    تاريخ التسجيل
    Oct 2003
    المشاركات
    718


    اول اجابة لهذا السؤال:

    What is the output of the following code?


    كود PHP:
    <?php 
    function functionSplit(){ 
      
    $pre 1
    ?> 
    <?php 
      
    echo $pre

    functionSplit(); 
    ?>
    Error; function declarations can not be split over multiple PHP segments.
    Nothing
    ------1
    2
    ==========

    الجواب هو 1 لأن الدالة لا تتأثر بفصل الكود بينما الكلاس يتأثر ...





    __________________
    أخي [ محمد الفارس ] في كل رد اقول .. شكراً لك ...
    البانر.نت .. نصنع من الافكار دليل

  3. #3
    عضو نشيط جدا
    تاريخ التسجيل
    May 2006
    المشاركات
    477


    السلام عليكم

    ليس لدي متسع من الوقت صراحة لذلك لم استطيع قراءة جميع الأسئلة

    سأفتح الباب للاجابات
    بالنسبه لاجابة السؤال الأول :
    هذه هي الدوال الجديده التي اضيفت للتعامل مع ال arrays ب php5
    array_intersect_key()
    و array_diff_key()

    يمكنك قرائة وظائفهم و المزيد عنهم من خلال المانيوال ب php.net





    __________________
    أحمد عبد الفتاح
    www.servmix.com
    لمراسلتي : admin@servmix.com


  4. #4
    عضو نشيط
    تاريخ التسجيل
    May 2006
    المشاركات
    168


    لا أعلم !
    لكن بإذن الله تعالى قريبا أعلم .

    متابعة بصمت .
    بالتوفيق للجميع .





    __________________
    100 صقر !!
    يومياتي في تعلم php ..
    أرحب بالمبتدئين لنتعلم معا والمحترفين ليقدموا النصح والتوجيه .
    .
    .
    سبحان الله وبحمده عدد خلقه .. ورضا نفسه .. وزنة عرشه .. ومداد كلماته .

  5. #5
    عضو سوبر نشيط
    تاريخ التسجيل
    Oct 2003
    المشاركات
    718


    اخواني الكرام ...

    ألا يوجد خبير نستفيد منه ؟ ..

    اختباري يوم السبت بعد القادم .. ارجوا الاجابة لتعم الفائدة الجميع ..





    __________________
    أخي [ محمد الفارس ] في كل رد اقول .. شكراً لك ...
    البانر.نت .. نصنع من الافكار دليل

  6. #6
    عضو نشيط جدا
    تاريخ التسجيل
    Jan 2008
    المشاركات
    512


    أخي ما سيفيدك حاليا هو قراءة ال Certification Guide الخاص بالشهادة

    و ذلك لكي تتعرف على الموضوعات التي تركز عليها الاختبارات، و من ثم تقوية نفسك فيها.

    لا تحل أسئلة قبل التعلم حتى لا تشتت معلوماتك.





    __________________
    محمد حمود.

  7. #7
    عضو فعال
    تاريخ التسجيل
    Aug 2007
    المشاركات
    1,431

  8. #8
    عضو سوبر نشيط
    تاريخ التسجيل
    Oct 2003
    المشاركات
    718


    أخي ما سيفيدك حاليا هو قراءة ال Certification Guide الخاص بالشهادة

    و ذلك لكي تتعرف على الموضوعات التي تركز عليها الاختبارات، و من ثم تقوية نفسك فيها.

    لا تحل أسئلة قبل التعلم حتى لا تشتت معلوماتك.
    قريت الكتب الخاصة بالشهادة .. ولكن بعض الاسئلة تكون غير مباشرة ..





    __________________
    أخي [ محمد الفارس ] في كل رد اقول .. شكراً لك ...
    البانر.نت .. نصنع من الافكار دليل

  9. #9
    عضو شرف
    تاريخ التسجيل
    May 2007
    المشاركات
    1,647


    Consider the following String:
    كود PHP:
    $string "John\tMark\nTed\tLarry"
    Which of the following functions would best parse the string above by the tab (\t) and newline (\n) characters?

    كود:
    strsplit($string, "\t\n");   
    strtok($string, "\t\n");   
    strstr($string, "\t\n");   
    explode("\t\n", $string);   
    All of the above
    الإجابة الصحيحة هي: strtok($string, "\t\n"); ، حيث أنها الدالة الوحيدة من المجموعة يمكنها تقسيم النص بواسطة أكثر من رمز في نفس الباراميتر : PHP: strtok - Manual

    Consider the following example XML document:
    كود PHP:
    <?xml version="1.0" encoding="ISO-8859-1" ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>  <title>XML Example</title> </head> <body>  <p>   Moved to <<a href="http://example.org/">http://www.example.org/</a>.>   <br>  </p> </body></html>
    What is wrong with this document, and how can it be corrected?

    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
    صراحة مالي خبرة في XML ، لكن بعد فحصه بـ 3 مواقع ، الأول يعطي Valid ، الثاني يعطي شوية أخطاء ( الـ Validator اللي في w3.org ) ، والثالث اللي في w3schools أعطاني إيرور مرة ، عدّلت الكود ، أعطاني إيرور مرة ثانية ، عدّلته مرة ثانية ظهر لي انه مافي أخطاء ..

    التعديلات كانت <br> إلى <br /> ، وتضبيط وسم A :
    كود:
    <<a href="http://example.org/">http://www.example.org/</a>.>
    إلى:
    كود:
    <a href="http://example.org/">http://www.example.org/</a>
    مثل ما ذكرت لك مالي خبرة في قواعد الـ XML ، بس حبيت أعطيك ملاحظاتي حتى ممكن تقدر تبحث أكثر وتعرف الإجابة إذا ما كنت تعرفها ..

    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
    أعتقد أن الإجابة هي: interface, implements ، وسبق تحدثنا عنهم في موضوع آخر .

    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
    هل القصد هنا هو مقبول برمجياً ؟ أو منطقياً يعني لحماية أكبر ؟

    إذا كان القصد مقبول برمجياً ، فهي It is always acceptable ، ومع ذلك لا أعتقد أن هذه هي الإجابة .

    صراحة يحيّر السؤال ، لكن أشوف إنه المستخدم بكثرة هو : When it is encrypted .

    Given the following array

    كود PHP:
    <?php 
    $a 
    = array(  => 'red',  'green',  'blue',  'purple' => array(    'house' => 'dog',    'food' => 'meal',    'here' => 'gone',    'hello' => array(      => 'goodbye',      => 'something',      'correct'))); 
    ?>
    Which of the following print statements will output the string "correct"?

    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];
    الإجابة :
    كود PHP:
    print $a['purple']['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()
    الإجابة هي: __sleep ، للمزيد حول Magic Methods في OOP : PHP: Magic Methods - Manual

    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
    الإجابات هي:
    Data received from Cookies
    Data received from HTTP POST
    Data received from HTTP GET


    للمزيد: PHP: $_REQUEST - Manual

    What is the output of the following code?

    كود PHP:
    <?php 
    function functionSplit(){ 
      
    $pre 1
    ?> 
    <?php 
      
    echo $pre

    functionSplit(); 
    ?>
    Error; function declarations can not be split over multiple PHP segments.
    Nothing
    1
    2
    الإجابة هي 1 ، والله أعلم .

    What are the three access modifiers that you can use in PHP objects?

    protected
    public
    static
    private
    final
    أعتقد أن الإجابات هي: protected, public, private

    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)
    حسب معلوماتي: Use is_object() within the function

    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))
    أعتقد أن هاتان خاطئتان:
    function c(MyClass $a = new MyClass())
    function b($a = (10 + 2))

    The _______ method will be called automatically when an object is represented as a string.

    getString()
    __get()
    __value()
    __toString()
    __getString()
    الإجابة: __toString()

    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);
    الإجابة: func_get_arg(2);

    What would go in place of ?????? below to make this script execute without a fatal error?

    كود PHP:
    <?php 
    $a 
    1
    $b 0
    ?????? 
    $c $a $b
    ?>
    quit();
    die();
    stop();
    __halt_compiler();
    exit();
    الإجابات: die(); وهي نفسها: exit(); ، بالإضافة إلى: __halt_compiler(); ،، حول الأخيرة: PHP: Manual Quick Reference

    The ____ construct is particularly useful to assign your own variable names to values within an array.

    array_get_variables
    current
    each
    import_variables
    list
    الإجابة: list

    بصراحة هذا اللي قدرت أجاوب عليه اليوم ، واعذرني جداً جداً لتأخيري الرد ، وذلك لأسباب دراسية ومرضية خلال هاليومين :$ ..

    وأيضاً اعذرني لعدم دقة إجاباتي أو صحة بعضها ، حاول نتساعد فقط ونتشارك المعلومات ، وإذا في شيء معين ممكن نبحث مع بعض حتى كلنا نستفيد إن شاء الله تعالى ..

    تحياتي، أشرف السمهوري





    التعديل الأخير تم بواسطة أشرف السمهوري ; 30-05-2008 الساعة 12:24 AM
    __________________
    # اتبعني على Twitter
    # عِرفان ساهم ببناء المحتوى العربي العلمي على الإنترنت!

  10. #10
    عضو سوبر نشيط
    تاريخ التسجيل
    Oct 2003
    المشاركات
    718


    استاذي اشرف ما قصرت ، ومجهود رائع تشكر عليه ..

    من كل قلبي شكرا ً ..





    __________________
    أخي [ محمد الفارس ] في كل رد اقول .. شكراً لك ...
    البانر.نت .. نصنع من الافكار دليل

  11. #11
    عضو شرف
    تاريخ التسجيل
    May 2007
    المشاركات
    1,647


    العفو أستاذ albanner ..

    بالمناسبة هنا :
    الإجابة هي: __serialize ، للمزيد حول Magic Methods في OOP : PHP: Magic Methods - Manual
    كنت أفكر في __sleep ولا أعلم كيف كتبت __serlialize ، يبدو أني سهوت لأن الدالة المذكورة هي serialize() ، الإجابة هي __sleep ، وسأقوم بتعديلها في ردي السابق الآن إن شاء الله حتى إذا أتى أي شخص لاحقاً لا يأخذ تلك الإجابة ..

    وإذا في أي نقطة حابب نناقشها أو نوصل بحل لها أو أي شي نبحث مع بعض ما في مشكلة ، فقط اذكر الأمر وإن شاء الله كلنا نبحث مع بعض ..

    تحياتي، أشرف السمهوري





    __________________
    # اتبعني على Twitter
    # عِرفان ساهم ببناء المحتوى العربي العلمي على الإنترنت!

  12. #12
    عضو سوبر نشيط
    تاريخ التسجيل
    Oct 2003
    المشاركات
    718


    شكرا استاذي ..

    ==== اعجبتني طريقة جميلة .. وهي BindValue

    كود PHP:
    <?php
    /* Execute a prepared statement by binding PHP variables */
    $calories 150;
    $colour 'red';
    $sth $dbh->prepare('SELECT name, colour, calories
        FROM fruit
        WHERE calories < ? AND colour = ?'
    );
    $sth->bindValue(1$caloriesPDO::PARAM_INT);
    $sth->bindValue(2$colourPDO::PARAM_STR);
    $sth->execute();
    ?>
    prepare = الاعداد قبل التنفيذ
    ? = علامة الاستفهام فراغ لجدولة مهمة

    لما كتب
    كود PHP:
    <?php
    $sth
    ->bindValue(1$caloriesPDO::PARAM_INT);
    $sth->bindValue(2$colourPDO::PARAM_STR);
    ?>
    تعني الزام القيمة الاولى اي ( ? ) في الاستعلام بـ
    PDO::PARAM_INT
    اي يجب ان تكون رقم

    والقيمة رقم 2 اي ( ? ) في الاستعلام بـ
    PDO::PARAM_STR
    اي يجب ان تكون حروف

    بعدها اعطاها امر التالي للتنفيذ ..

    كود PHP:
    <?
    $sth
    ->execute();
    ?>
    ====== معليش ذاكروا معي للفائدة .. ما احب اذاكر لوحدي ..





    __________________
    أخي [ محمد الفارس ] في كل رد اقول .. شكراً لك ...
    البانر.نت .. نصنع من الافكار دليل

  13. #13
    عضو سوبر نشيط
    تاريخ التسجيل
    Oct 2003
    المشاركات
    718


    وهذه الطريقة للاستعلام واظهار النتائج ...

    كود PHP:
    <?php
    $sth 
    $dbh->prepare("SELECT name, colour FROM fruit");
    $sth->execute();

    $result $sth->fetchAll();
    print_r($result);
    ?>
    prepare = الاعداد للإستعلام
    execute = تنفيذ

    كود PHP:
    <?php
    // هنا اظهار النتائج
    $result $sth->fetchAll();
    // هنا طباعة الاستعلام
    print_r($result);
    ?>
    ويمكن ايضا ً اظهار النتائج بطريقة اخرى .. مثلا

    كود PHP:
    <?php
    // بتحديد رقم السجل معين
    $result $sth->fetchAll(PDO::FETCH_COLUMN0);
    // هنا طباعة السجل
    print_r($result);
    ?>






    __________________
    أخي [ محمد الفارس ] في كل رد اقول .. شكراً لك ...
    البانر.نت .. نصنع من الافكار دليل

  14. #14
    عضو شرف
    تاريخ التسجيل
    May 2007
    المشاركات
    1,647


    أخوي albanner طمنا ايش سويت في الاختبار ؟ مو اليوم الموعد ولا انا غلطان ؟

    أتمنى إنك تكون سويت كويس فيه ، منتظر ردك على أحر من الجمر :con2: ..

    تحياتي، أشرف السمهوري





    __________________
    # اتبعني على Twitter
    # عِرفان ساهم ببناء المحتوى العربي العلمي على الإنترنت!

  15. #15
    عضو سوبر نشيط
    تاريخ التسجيل
    Oct 2003
    المشاركات
    718


    أجلت الموعد إلى 14/06/2008

    بصراحة حسيت اني أحتاج وقت بسيط للمراجعة فأجلته السبت القادم.










ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •  

أضف موقعك هنا| اخبار السيارات | حراج | شقق للايجار في الكويت | بيوت للبيع في الكويت | دليل الكويت العقاري | مقروء | شركة كشف تسربات المياه | شركة عزل اسطح بالرياض | عزل فوم بالرياض| عزل اسطح بالرياض | كشف تسربات المياة بالرياض | شركة عزل اسطح بالرياض