3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { protected $bar = 'fg'; } echo (new foo)->bar;
Output for 8.1.0 - 8.1.29, 8.2.0 - 8.2.20, 8.3.0 - 8.3.8
Fatal error: Uncaught Error: Cannot access protected property foo::$bar in /in/quWie:7 Stack trace: #0 {main} thrown in /in/quWie on line 7
Process exited with code 255.

preferences:
70.73 ms | 402 KiB | 65 Q