3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subdir = 'rasmus'; $file = 'phpfi'; define('DIR', __DIR__); echo "{$DIR}/{$subdir}/{$file}\n"; echo "{$ DIR}/{$subdir}/{$file}\n"; ?>
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
Parse error: syntax error, unexpected 'DIR' (T_STRING), expecting variable (T_VARIABLE) or '{' or '$' in /in/JMN4F on line 10
Process exited with code 255.

preferences:
164.97 ms | 1399 KiB | 36 Q