This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Contains Drupal\system\Tests\Module\ModuleEnable. | |
*/ | |
namespace Drupal\system\Tests\Module; | |
use Drupal\simpletest\WebTestBase; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> php bench.php | |
Peak memory before test: 422.43 KB | |
Iterations: 1,000,000 | |
nothing: 0.2577 seconds | |
function no_op(): 1.4858 seconds | |
!$value: 0.3877 seconds | |
$value === FALSE: 0.3837 seconds | |
FALSE === $value: 0.3868 seconds | |
$value == FALSE: 0.3889 seconds |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$yaml = Yaml::dump('sun.settings.yml'): | |
id: my_settings | |
label: !!php/object:O:1:"t":1:{s:9:"*string";s:12:"Translate me";} | |
var_dump($parsed = Yaml::parse($yaml)): | |
array(2) { | |
["id"]=> | |
string(11) "my_settings" | |
["label"]=> | |
object(t)#34 (1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\Core\Config; | |
use Drupal\Core\Config\StorageInterface; | |
class ConfigObject { | |
protected $name = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function config($name, $config_class = NULL, $storage_class = NULL) { | |
static $config_instances = array(), $storage_instances = array(); | |
// Set defaults. | |
if (!isset($config_class)) { | |
$config_class = 'Drupal\Core\Config\DrupalConfig'; | |
} | |
if (!isset($storage_class)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# d.o collaboration | |
- http://drupal.org/project/issues/webmasters | |
- http://drupal.org/project/issues/infrastructure | |
- http://drupal.org/project/issues/drupalorg | |
- http://drupal.org/project/issues/project | |
- http://drupal.org/project/issues/project_issue | |
# Code | |
- http://drupal.org/project/issues/git_dev | |
- http://drupal.org/project/issues/project_git_instructions |
NewerOlder