Sending “var_dump” to FireBug console

前端 未结 12 1228
忘掉有多难
忘掉有多难 2020-12-31 13:11

As you know var_dump() in addition to value show its data type and length.

Is there any way to log its output to

12条回答
  •  礼貌的吻别
    2020-12-31 13:28

    only from JavaScript a jquery From arrays in firebug and chrome is:

     console.dir('[object arrays]'); 
    

    open the console and activate to F12... and write this code in console is the var_dump to php from jquery. array to json

    var test = {"names":["john doe","JANE doe"],"ids":["123",null]}; console.dir(test);
    

    if you need directly console fron PHP need a plugin

提交回复
热议问题