Skip to content

Instantly share code, notes, and snippets.

@danslo
Created August 7, 2013 15:23
Show Gist options
  • Save danslo/6175062 to your computer and use it in GitHub Desktop.
Save danslo/6175062 to your computer and use it in GitHub Desktop.
<?php
$config = simplexml_load_string('<config><prepare /></config>');
$configArray = (array)$config;
var_dump((bool)$config->prepare); // true
var_dump((bool)$configArray['prepare']); // false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment