Skip to content

Instantly share code, notes, and snippets.

@shin1x1
Created November 18, 2010 23:58
Show Gist options
  • Save shin1x1/705914 to your computer and use it in GitHub Desktop.
Save shin1x1/705914 to your computer and use it in GitHub Desktop.
<?php
class Foo {
public $value = 'abc';
public function __toString() {
echo(__METHOD__).PHP_EOL;
return '';
}
}
function func($text) {
echo('func start').PHP_EOL;
$a = unserialize($text);
$a .= '.txt'; // not string
echo('func end').PHP_EOL;
}
func('O:3:"Foo":1:{s:5:"valua";s:3:"abc";}');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment