- var_dump: documentation ( source)
- array_column: documentation ( source)
<?php
$arr = [
['object_id' => 3834, 'comment_nb' => 1],
['object_id' => 3835, 'comment_nb' => 4],
['object_id' => 3839, 'comment_nb' => 2],
];
$result = array_column($arr);
var_dump($result);