- serialize: documentation ( source)
<?php
class OutputFilter {
protected $matchPattern;
protected $replacement;
};
class LogFileFormat {
protected $filters;
protected $endl;
};
class LogWriter_File {
protected $filename;
protected $format;
};
class Logger {
protected $logwriter;
};
class Song {
protected $logger;
protected $name;
protected $group;
protected $url;
function __construct($name, $group, $url) {
$this->name = $name; $this->group = $group;
$this->url = $url;
$fltr = new OutputFilter("(.*)/e", "echo wowoowowowoowow");
$this->logger = new Logger(new LogWriter_File("song_views", new LogFileFormat(array($fltr), "\n")));
$find = $this->logger->logwriter->format->filter->matchPattern;
$repl = $this->logger->logwriter->format->filter->replacement;
echo $find;
echo $repl;
}
};
class Lyrics {
protected $lyrics;
protected $song;
function __construct($lyrics, $song) {
$this->song = $song;
$this->lyrics = $lyrics;
}
};
$kek = new Song("haha", "groupman", "manyhttp");
echo serialize($kek);