Is there a built-in function to print all the current properties and values of an object?

問題:

So what I'm looking for here is something like PHP's print_r function.所以我在這裏尋找的是類似於 PHP 的print_r函數的東西。

This is so I can debug my scripts by seeing what's the state of the object in question.這樣我就可以通過查看相關對象的狀態來調試我的腳本。


解決方案:

參考一: https://en.stackoom.com/question/nyX
參考二: https://stackoom.com/question/nyX
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章