3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo2() { static $i = 1; static $i = 2; }
Output for 8.3.0 - 8.3.27, 8.4.1 - 8.4.14
Fatal error: Duplicate declaration of static variable $i in /in/kt8Gn on line 5
Process exited with code 255.
Output for 8.2.0 - 8.2.29

preferences:
164.39 ms | 1012 KiB | 7 Q