3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { const T = (int) 1.73; // Fatal error //const U = (object) []; } echo X::T; //
Output for 8.5.0 - 8.5.2
1
Output for 8.3.0 - 8.3.30, 8.4.1 - 8.4.17
Fatal error: Constant expression contains invalid operations in /in/QnIDl on line 4
Process exited with code 255.

preferences:
53.36 ms | 695 KiB | 3 Q