3v4l.org

run code in 300+ PHP versions simultaneously
<?php class BranchScheduleItem implements Serializable{ protected $title; protected $morning; protected $afternoon; public function serialize() { return serialize([ 'title' => $this->title, 'morning' => $this->morning, 'afternoon' => $this->afternoon, ]); } public function unserialize($serialized) { $data = unserialize($serialized); $this->title = $data['title']; $this->morning = $data['morning']; $this->afternoon = $data['afternoon']; } } $o = new BranchScheduleItem; $s = serialize($o); $a = unserialize($s); print_r($a); print_r($s);
Output for git.master_jit, git.master, rfc.property-hooks
Deprecated: BranchScheduleItem implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /in/aKQ63 on line 3 BranchScheduleItem Object ( [title:protected] => [morning:protected] => [afternoon:protected] => ) C:18:"BranchScheduleItem":54:{a:3:{s:5:"title";N;s:7:"morning";N;s:9:"afternoon";N;}}

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:
56.53 ms | 402 KiB | 8 Q