Sự khác biệt giữa cảnh báo và lỗi nghiêm trọng trong php là gì?

Lỗi là lỗi hoặc lỗi trong một chương trình. Nó có thể là một số loại. Lỗi có thể xảy ra do sai cú pháp hoặc sai logic. Đó là một loại lỗi hoặc tình trạng hiểu biết sai về mã

Có nhiều loại lỗi khác nhau trong PHP nhưng về cơ bản có bốn loại lỗi chính

  1. Lỗi phân tích cú pháp hoặc Lỗi cú pháp. Là loại lỗi do người lập trình thực hiện trong mã nguồn của chương trình. Lỗi cú pháp được bắt bởi trình biên dịch. Sau khi sửa lỗi cú pháp, trình biên dịch sẽ biên dịch mã và thực thi nó. Lỗi phân tích cú pháp có thể do dấu ngoặc kép không đóng, dấu ngoặc đơn bị thiếu hoặc thừa, dấu ngoặc nhọn không đóng, thiếu dấu chấm phẩy, v.v.
    Ví dụ.




    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    2

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    3
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    4____45
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    6

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    0
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    1
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    6

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    3
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    3
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    6

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    3
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    7
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    6

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    9

    Lỗi

    PHP Parse error:  syntax error, unexpected '=' 
    in /home/18cb2875ac563160a6120819bab084c8.php on line 3
    

    Giải trình. Chương trình trên thiếu dấu $ ở dòng 3 nên báo lỗi

  2. Lỗi nghiêm trọng. Đây là loại lỗi mà trình biên dịch PHP hiểu mã PHP nhưng nó nhận ra một chức năng không được khai báo. Điều này có nghĩa là chức năng được gọi mà không có định nghĩa của chức năng.
    Ví dụ.




    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    2

    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    1

    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    2
    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    3
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    3
    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    5
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    7
    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    7

    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    8

    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    9
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    50
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    4
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    3
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    53
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    7
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    6

    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    9
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    3
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    58
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    59
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    50
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    6

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    32

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    3
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    34

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    7
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    36

    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    3______43____75______07
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    21

    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    1

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    23
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    3____75______07
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    21

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    9

    Lỗi

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    

    Giải trình. Ở dòng 12, hàm được gọi nhưng không có định nghĩa hàm. Vì vậy, nó đưa ra lỗi

  3. Lỗi Cảnh báo. Lý do chính của lỗi cảnh báo bao gồm một tệp bị thiếu. Điều này có nghĩa là hàm PHP gọi tệp bị thiếu.
    Ví dụ.




    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    29

    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    1

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    3
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    4
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    33
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    6

    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    1

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    36
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    37____438
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    21

    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    
    1

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    3
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    3
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    59____444
    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    6

    PHP Fatal error:  Uncaught Error: 
    Call to undefined function diff() 
    in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php:12
    
    Stack trace:
    #0 {main}
      thrown in /home/36db1ad4634ff7deb7f7347a4ac14d3a.php on line 12
    
    9

    Lỗi

    PHP Warning:  include(gfg.php): failed to 
    open stream: No such file or directory in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    PHP Warning:  include(): Failed opening 'gfg.php'
     for inclusion (include_path='.:/usr/share/php') in 
    /home/aed0ed3b35fece41022f332aba5c9b45.php on line 5
    

    Giải trình. Chương trình này gọi một tệp không xác định gfg. php không có sẵn. Vì vậy, nó tạo ra lỗi

    Lỗi nghiêm trọng trong PHP là gì?

    Lỗi nghiêm trọng khi khởi động. Lỗi này xảy ra khi hệ thống không thể chạy mã trong quá trình cài đặt . Thời gian biên dịch lỗi nghiêm trọng. Lỗi này xảy ra nếu lệnh gọi được thực hiện với một mã hoặc biến không tồn tại. Thời gian chạy lỗi nghiêm trọng. Lỗi này xảy ra trong khi chương trình đang chạy và sẽ khiến chương trình ngừng hoạt động.

    Sự khác biệt giữa cảnh báo và lỗi là gì?

    CẢNH BÁO. Một cái gì đó đã không hoạt động như nó nên. Điều này có thể có tầm quan trọng lớn hơn hoặc ít hơn tùy thuộc vào hoàn cảnh. e. g. Không tìm thấy tệp đầu vào hoặc có định dạng sai. LỖI. Đã xảy ra sự cố '`nghiêm trọng''

    Cảnh báo PHP nghĩa là gì?

    Lỗi cảnh báo trong PHP không ngăn tập lệnh chạy. Nó chỉ cảnh báo bạn rằng có một vấn đề, một vấn đề có khả năng gây ra những vấn đề lớn hơn trong tương lai . Các nguyên nhân phổ biến nhất của lỗi cảnh báo là. Gọi một tệp bên ngoài không tồn tại trong thư mục. Tham số sai trong hàm.

    Sự khác biệt giữa gây tử vong và lỗi là gì?

    Lỗi logic (e. g. , khi cả hai dấu ngoặc nhọn trong một khối bị loại bỏ) có hiệu lực tại thời điểm thực hiện. Lỗi logic nghiêm trọng khiến ứng dụng bị lỗi và chấm dứt sớm . Lỗi logic không nghiêm trọng cho phép ứng dụng tiếp tục thực thi nhưng khiến ứng dụng tạo ra kết quả không chính xác.