我有一个包含320个数组的数组,使用普通的var_dump
可以展示所有嵌套元素,而Laravel的dd
助手会在索引147处截断嵌套元素,并且后续的所有元素都被截断,没有展开它们的选项,如下例所示。
146 => array:17 [▼
"total_unconfirmed_subscribers" => 0
"total_subscribers_subscribed_yesterday" => 0
"unique_list_id" => "24324"
"http_etag" => ""fbb6febfca8af5541541ea960aaedb""
"web_form_split_tests_collection_link" => "https://api.com/1.0/"
"subscribers_collection_link" => "https://api.com/1.0/"
"total_subscribers_subscribed_today" => 0
"id" => 23432
"total_subscribed_subscribers" => 0
"total_unsubscribed_subscribers" => 0
"campaigns_collection_link" => "https://api.com/1.0/"
"custom_fields_collection_link" => "https://api.com/1.0/accounts"
"self_link" => "https://api.com/1.0/accounts"
"total_subscribers" => 0
"resource_type_link" => "https://api.com/1.0/#list"
"web_forms_collection_link" => "https://api.com/"
"name" => "dccode"
]
147 => array:17 [▼
"total_unconfirmed_subscribers" => 0
…16
]
148 => array:17 [ …17]
149 => array:17 [ …17]
为什么限制为147个完整记录,如何增加限制?
相关主题Laravels的DD助手函数是否正常工作?并没有解释限制。
这是非常一致的行为,我已经在Linux(Laravel Forge,DO droplet,Ubuntu),Mac(Laravel Valet)和Windows(valet4windows)上使用Laravel 5.2和php7进行了测试。
每个地方都在第147个元素上得到了完全相同的切割。使用CLI
php artisan tinker
输出相同的切割。...
"name" => "dccode" ] 147 => array:17 [
"total_unconfirmed_subscribers" => 0
16 ] 148 => array:17 [ 17]
...
print_r()
代替? - Derek Pollardvar_dump
和print_r
都可以正常工作,我不关心如何查看数据,我想了解dd的限制。 - vitr147 => array:17 [ "total_unconfirmed_subscribers" => 0 ÔǪ16 ]
- vitr