Passing database connection by reference in PHP

后端 未结 7 2217
清歌不尽
清歌不尽 2020-12-31 09:05

The question is if a database connection should be passed in by reference or by value?

For me I\'m specifically questioning a PHP to MySQL connection, but I think it

7条回答
  •  忘掉有多难
    2020-12-31 09:39

    i don't really have a specific answer for php, but in general it would seem to me that you would want to pass this by reference if you are not explicitly sure that you encounter performance issues when passing by value.

提交回复
热议问题