3v4l.org

run code in 300+ PHP versions simultaneously
<?php class IBreakThings { private $mine; public function __set(string $property, $value) : void { $this->$property = $value; } } class IExtendBrokenThings extends IBreakThings { private $actuallyMine; } $instance = new IExtendBrokenThings(); $instance->mine = 'yep'; $instance->actuallyMine = 'ha!';
Output for 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Fatal error: Uncaught Error: Cannot access private property IExtendBrokenThings::$actuallyMine in /in/3Y7cq:8 Stack trace: #0 /in/3Y7cq(20): IBreakThings->__set('actuallyMine', 'ha!') #1 {main} thrown in /in/3Y7cq on line 8
Process exited with code 255.
Output for 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33

preferences:
110.29 ms | 1625 KiB | 4 Q