3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class FileClass { public $command = 'return file_get_contents("info.txt");'; public function __toString() { return eval($this->command); } } $x = new FileClass(); var_dump(serialize($x));
based on Qbl8R
Output for 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.30 - 7.3.0rc2
string(79) "O:9:"FileClass":1:{s:7:"command";s:37:"return file_get_contents("info.txt");";}"