if(!empty($_GET['decode'])) {
	$decode = unserialize(stripslashes($_GET['decode']));

pre {
	font-size: small;
.form {
	vertical-align: top;
	font-size: small;
.form textarea {
	float: left;
	<h3>Decode serialized PHP array(s)</h3>
	<p>Note: Remember to strip any extra spaces or newlines in case of decode error.</p>
	<div class="form">
		<textarea id="decodetext" name="decode" rows="10" cols="80"><?php if(!empty($_GET['decode'])) { echo stripslashes($_GET['decode']); } ?></textarea>
			<label for="color">Color output</label>
			<input type="checkbox" name="color" value="yes" <?php echo (empty($_GET['color']))?'':'checked ' ?>/>
		<input type="submit" value="Decode!">
		<input type="button" value="Clear" onClick="document.getElementById('decodetext').innerHTML = ''">
	<div style="clear:both;"></div>
	<?php if(!empty($decode)) { ?>
			<b>Decoded result:</b>
			<pre><?php (empty($_GET['color']))?print_r($decode):var_dump($decode) ?></pre>
	<?php } ?>