Array
(
    [result] => Array
        (
            [result] => Array
                (
                    [department] => Array
                        (
                            [0] => Array
                                (
                                    [ID] => 1
                                    [NAME] => RosCo | Consulting & audit
                                    [SORT] => 500
                                    [UF_HEAD] => 10
                                )

                            [1] => Array
                                (
                                    [ID] => 7
                                    [NAME] => IT
                                    [SORT] => 100
                                    [PARENT] => 1
                                    [UF_HEAD] => 14
                                )

                            [2] => Array
                                (
                                    [ID] => 56
                                    [NAME] => ОТДЕЛ КАДРОВ
                                    [SORT] => 200
                                    [PARENT] => 1
                                    [UF_HEAD] => 2672
                                )

                            [3] => Array
                                (
                                    [ID] => 5
                                    [NAME] => МЕНЕДЖЕРЫ
                                    [SORT] => 300
                                    [PARENT] => 56
                                )

                            [4] => Array
                                (
                                    [ID] => 118
                                    [NAME] => Руководство
                                    [SORT] => 400
                                    [PARENT] => 56
                                    [UF_HEAD] => 36
                                )

                            [5] => Array
                                (
                                    [ID] => 3
                                    [NAME] => БУХГАЛТЕРА
                                    [SORT] => 500
                                    [PARENT] => 118
                                    [UF_HEAD] => 26
                                )

                            [6] => Array
                                (
                                    [ID] => 100
                                    [NAME] => Бухгалтерия 1
                                    [SORT] => 500
                                    [PARENT] => 3
                                    [UF_HEAD] => 26
                                )

                            [7] => Array
                                (
                                    [ID] => 102
                                    [NAME] => Бухгалтерия 2
                                    [SORT] => 500
                                    [PARENT] => 3
                                    [UF_HEAD] => 3346
                                )

                            [8] => Array
                                (
                                    [ID] => 112
                                    [NAME] => Бухгалтерия 3
                                    [SORT] => 500
                                    [PARENT] => 3
                                    [UF_HEAD] => 13926
                                )

                            [9] => Array
                                (
                                    [ID] => 26
                                    [NAME] => СЕКРЕТАРИАТ
                                    [SORT] => 500
                                    [PARENT] => 56
                                )

                            [10] => Array
                                (
                                    [ID] => 9
                                    [NAME] => ЮРИСТЫ
                                    [SORT] => 600
                                    [PARENT] => 56
                                    [UF_HEAD] => 8472
                                )

                            [11] => Array
                                (
                                    [ID] => 78
                                    [NAME] => Помощники юристов
                                    [SORT] => 500
                                    [PARENT] => 9
                                    [UF_HEAD] => 38
                                )

                            [12] => Array
                                (
                                    [ID] => 76
                                    [NAME] => Чат-боты
                                    [SORT] => 700
                                    [PARENT] => 1
                                )

                        )

                )

            [result_error] => Array
                (
                )

            [result_total] => Array
                (
                    [department] => 13
                )

            [result_next] => Array
                (
                )

            [result_time] => Array
                (
                    [department] => Array
                        (
                            [start] => 1574449120.1235
                            [finish] => 1574449120.1273
                            [duration] => 0.0037591457366943
                            [processing] => 0.0036680698394775
                            [date_start] => 2019-11-22T21:58:40+03:00
                            [date_finish] => 2019-11-22T21:58:40+03:00
                        )

                )

        )

    [time] => Array
        (
            [start] => 1574449120.0965
            [finish] => 1574449120.1273
            [duration] => 0.030777931213379
            [processing] => 0.0038189888000488
            [date_start] => 2019-11-22T21:58:40+03:00
            [date_finish] => 2019-11-22T21:58:40+03:00
        )

)
/home/bitrix/ext_www/rosco.su/custom_backup/custom/test_vs.php:67:
array (size=2)
  'result' => 
    array (size=5)
      'result' => 
        array (size=1)
          'department' => 
            array (size=13)
              ...
      'result_error' => 
        array (size=0)
          empty
      'result_total' => 
        array (size=1)
          'department' => int 13
      'result_next' => 
        array (size=0)
          empty
      'result_time' => 
        array (size=1)
          'department' => 
            array (size=6)
              ...
  'time' => 
    array (size=6)
      'start' => float 1574449120.0965
      'finish' => float 1574449120.1273
      'duration' => float 0.030777931213379
      'processing' => float 0.0038189888000488
      'date_start' => string '2019-11-22T21:58:40+03:00' (length=25)
      'date_finish' => string '2019-11-22T21:58:40+03:00' (length=25)
Array ( [0] => 8472 [1] => 38 )