3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait SafeAccess { public function __set($name, $value) { throw new \Exception("Property [$name] doesn't exist for class [".get_class($this)."] so can't set it"); } public function __get($name) { throw new \Exception("Property [$name] doesn't exist for class [".get_class($this)."] so can't get it"); } public function __call($name, $arguments) { throw new \Exception("Method [$name] doesn't exist for class."); } } class foo { use SafeAccess; public function __construct() { $this->uwotm8 = true; } } new foo();
Output for rfc.property-hooks, git.master, git.master_jit
Fatal error: Uncaught Exception: Property [uwotm8] doesn't exist for class [foo] so can't set it in /in/vkiD7:5 Stack trace: #0 /in/vkiD7(21): foo->__set('uwotm8', true) #1 /in/vkiD7(26): foo->__construct() #2 {main} thrown in /in/vkiD7 on line 5
Process exited with code 255.

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:
103.35 ms | 1834 KiB | 4 Q