3v4l.org

run code in 300+ PHP versions simultaneously
<?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"))); } }; 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);
Output for git.master, git.master_jit, rfc.property-hooks
O:4:"Song":4:{s:9:"*logger";O:6:"Logger":1:{s:12:"*logwriter";N;}s:7:"*name";s:4:"haha";s:8:"*group";s:8:"groupman";s:6:"*url";s:8:"manyhttp";}

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.84 ms | 401 KiB | 8 Q