PHP try-catch not working

后端 未结 5 578
慢半拍i
慢半拍i 2020-12-16 10:51
try     
{
    $matrix = Query::take(\"SELECT moo\"); //this makes 0 sense

    while($row = mysqli_fetch_array($matrix, MYSQL_BOTH)) //and thus this line should be          


        
5条回答
  •  盖世英雄少女心
    2020-12-16 11:46

    In PHP a warning is not an exception. Generally the best practice would be to use defensive coding to make sure the result is what you expect it to be.

提交回复
热议问题