3v4l.org

run code in 300+ PHP versions simultaneously
<?php const DIR_PATH_LINUX = '/opt/myprogram/'; const DIR_PATH_WINDOWS = 'C:\xampp\htdocs\\parspack\\storage\\myprogram\\'; $os = 'windows'; echo constant(DIR_PATH_.strtoupper($os));
based on TGoKZ
Output for 8.0.0
Fatal error: Uncaught Error: Undefined constant "DIR_PATH_" in /in/r8ec2:7 Stack trace: #0 {main} thrown in /in/r8ec2 on line 7
Process exited with code 255.
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.23, 7.4.0 - 7.4.13
Warning: Use of undefined constant DIR_PATH_ - assumed 'DIR_PATH_' (this will throw an Error in a future version of PHP) in /in/r8ec2 on line 7 C:\xampp\htdocs\parspack\storage\myprogram\