3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A implements Stringable { public function __toString() { return 'a'; } }
Output for 8.0.24, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Output for 7.4.33
Fatal error: Uncaught Error: Interface 'Stringable' not found in /in/f5UN4:3 Stack trace: #0 {main} thrown in /in/f5UN4 on line 3
Process exited with code 255.

preferences:
46.89 ms | 401 KiB | 64 Q