Views: 8640
Last Modified: 15.09.2014

var_dump – option

The simplest option consists in using the var_dump(): obtaining the composition of the variable, even if it is an object or an array. If we wrap up the output of this operator in <pre>, the result will be readable.

irePHP – option

There is a more sophisticated and eventually more convenient way to view the contents of variables. You will need the FireFox browser, FireBug extension, and FirePHP extension installed.

Download from this site the latest version of class to work with the FirePHP extension and connect this class to your motor:

  1. Copy the file fb.php to the folder /bitrix/php_interface/
  2. Add the following string to the file /bitrix/php_inteface/init.php:
    require_once(‘FirePHPCore/fb.php’);

Now you can use logging in the FireBug console. In its simplest form, it is made as follows: fb($var), to set a label use: fb($var, ‘Label’);



Courses developed by Bitrix24