3v4l.org

run code in 300+ PHP versions simultaneously
<?php const xxx = 123; $arr = [1,2,3]; $x = 1; echo xxx-$arr{$x}; echo "\n"; echo xxx.$arr{$x};
Output for 8.0.1 - 8.0.17, 8.1.0 - 8.1.4
Fatal error: Array and string offset access syntax with curly braces is no longer supported in /in/58Rh8 on line 6
Process exited with code 255.
Output for 7.4.0 - 7.4.28
Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/58Rh8 on line 6 Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/58Rh8 on line 8 121 1232

preferences:
31.41 ms | 410 KiB | 5 Q