fork download
  1. <?php
  2.  
  3. $config = array(
  4. "allowable_tags" => "<p>",
  5. "span_regex" => null,
  6. "allow_nbsp" => true,
  7. "allow_class" => false
  8. );
  9.  
  10. $string = serialize($config);
  11.  
  12. echo $string ."\n\n";
  13.  
  14. $array = unserialize($string);
  15.  
  16. print_r($array);
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
a:4:{s:14:"allowable_tags";s:3:"<p>";s:10:"span_regex";N;s:10:"allow_nbsp";b:1;s:11:"allow_class";b:0;}

Array
(
    [allowable_tags] => <p>
    [span_regex] => 
    [allow_nbsp] => 1
    [allow_class] => 
)