Tag Archives: serialise

#php serialize() encodes null’s as ‘N’

php serialize() encodes null’s as the character ‘N’

IN 
<?php
$a = array('a'=>123,'b'=>NULL);
echo serialize($a);
?>

OUT
a:2:{s:1:"a";i:123;s:1:"b";N;}