3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subdir = 'rasmus'; $file = 'phpfi'; ${''} = new class { const DIR = __DIR__; }; echo "{${::DIR}}/{$subdir}/{$file}\n"; ?>
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM) in /in/a9cfV on line 8
Process exited with code 255.

preferences:
168.99 ms | 1395 KiB | 36 Q