PHP code example of sikofitt / mocks-drupal-variables

1. Go to this page and download the library: Download sikofitt/mocks-drupal-variables library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sikofitt / mocks-drupal-variables example snippets


variable_set('myvar', 'myvalue');
variable_get('myvar'); // myvalue
variable_del('myvar');
variable_get('myvar', 'default_if_not_found'); // default_if_not_found
require 'vendor/autoload.php'