<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                # 運算符 * * * * * Table of Contents 1. 運算符優先級 2. 算術運算符 3. 賦值運算符 4. 位運算符 5. 比較運算符 6. 錯誤控制運算符 7. 執行運算符 8. 遞增/遞減運算符 9. 邏輯運算符 10. 字符串運算符 11. 數組運算符 12. 類型運算符 > 運算符是可以通過給出的一或多個值(用編程行話來說,表達式)來產生另一個值(因而整個結構成為一個表達式)的東西。 * * * * * **運算符優先級** | 無 | clone new | clone 和 new | | --- | --- | --- | | 左 | [ | array() | | 右 | ++ -- ~ (int) (float) (string) (array) (object) (bool) @ | 類型和遞增/遞減 | | 無 | instanceof | 類型 | | 右 | ! | 邏輯運算符 | | 左 | * / % | 算術運算符 | | 左 | + - . | 算術運算符和字符串運算符 | | 左 | << >> | 位運算符 | | 無 | == != === !== <> | 比較運算符 | | 左 | & | 位運算符和引用 | | 左 | ^ | 位運算符 | | 左 | \| | 位運算符 | | 左 | && | 邏輯運算符 | | 左 | \|\| | 邏輯運算符 | | 左 | ? : | 三元運算符 | | 右 | = += -= *= /= .= %= &= |= ^= <<= >>= => | 賦值運算符 | | 左 | and | 邏輯運算符 | | 左 | xor | 邏輯運算符 | | 左 | or | 邏輯運算符 | | 左 | , | 多處用到 | * * * * * **算術運算符** ~~~ echo ( 5 % 3 ). "\n" ; // prints 2 echo ( 5 % - 3 ). "\n" ; // prints 2 echo (- 5 % 3 ). "\n" ; // prints -2 echo (- 5 % - 3 ). "\n" ; // prints -2 ~~~ **賦值運算符** ~~~ $a = ( $b = 4 ) + 5 ; // $a 現在成了 9,而 $b 成了 4。 ~~~ **位運算符** ~~~ echo 12 ^ 9 ; // Outputs '5' echo "12" ^ "9" ; // Outputs the Backspace character (ascii 8) // ('1' (ascii 49)) ^ ('9' (ascii 57)) = #8 echo "hallo" ^ "hello" ; // Outputs the ascii values #0 #4 #0 #0 #0 // 'a' ^ 'e' = #4 echo 2 ^ "3" ; // Outputs 1 // 2 ^ ((int)"3") == 1 echo "2" ^ 3 ; // Outputs 1 // ((int)"2") ^ 3 == 1 ~~~ **比較運算符** ~~~ var_dump ( 0 == "a" ); // 0 == 0 -> true var_dump ( "1" == "01" ); // 1 == 1 -> true var_dump ( "10" == "1e1" ); // 10 == 10 -> true var_dump ( 100 == "1e2" ); // 100 == 100 -> true switch ( "a" ) { case 0 : echo "0" ; break; case "a" : // never reached because "a" is already matched with 0 echo "a" ; break; } ~~~ **錯誤控制運算符** ~~~ /* Intentional file error */ $my_file = @ file ( 'non_existent_file' ) or die ( "Failed opening file: error was ' $php_errormsg '" ); ~~~ **執行運算符** ~~~ $output = ` ls -al `; echo "<pre> $output </pre>" ; ~~~ **遞增/遞減運算符** **邏輯運算符** ~~~ $a = ( false && foo ()); $b = ( true || foo ()); $c = ( false and foo ()); $d = ( true or foo ()); ~~~ **字符串運算符** ~~~ $a = "Hello " ; $b = $a . "World!" ; // now $b contains "Hello World!" $a = "Hello " ; $a .= "World!" ; // now $a contains "Hello World!" ~~~ **數組運算符** ~~~ $a = array( "a" => "apple" , "b" => "banana" ); $b = array( "a" => "pear" , "b" => "strawberry" , "c" => "cherry" ); $c = $a + $b ; // Union of $a and $b echo "Union of \$a and \$b: \n" ; var_dump ( $c ); $c = $b + $a ; // Union of $b and $a echo "Union of \$b and \$a: \n" ; var_dump ( $c ); ~~~ **類型運算符** ~~~ class MyClass { } class NotMyClass { } $a = new MyClass ; var_dump ( $a instanceof MyClass ); var_dump ( $a instanceof NotMyClass ); ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看