3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $name; public $age; public $likes; function __construct($name, $age, $likes) { $this->name = $name; $this->age = $age; $this->likes = $likes; } function __get($property) { if (property_exists($this, $property)) { return $this->$property; } else { return "Not available"; } } } $user1 = new Test("Sam", 18, "coding"); $jsonData = json_encode($user1); ?> <form action="process.php" method="get"> <input type="hidden" name="data" value="<?= $jsonData; ?>"> <input type="submit" value="go"> </form>
Output for rfc.property-hooks, git.master, git.master_jit
<form action="process.php" method="get"> <input type="hidden" name="data" value="{"name":"Sam","age":18,"likes":"coding"}"> <input type="submit" value="go"> </form>

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:
40.19 ms | 1137 KiB | 4 Q