<?php $raw = array( '\'Weck\'' => ' is \'good\'', 'And:' => '"something"', ',' => 'can be "good"', '~' => ' as well', 'But' => 'It turns out that if there\'s a ", \', :, or ; in any of the array values the serialization gets corrupted.', 'Seems' => 'not the problem',); $input = serialize($raw); print_r(unserialize($input));
Standard input is empty
Array ( ['Weck'] => is 'good' [And:] => "something" [,] => can be "good" [~] => as well [But] => It turns out that if there's a ", ', :, or ; in any of the array values the serialization gets corrupted. [Seems] => not the problem )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!