3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dash = html_entity_decode('&ndash;'); $a = ["Suché {$dash} trvanlivé", "Ovozel {$dash} chlazené", "Mražené", "Chlazené", "Drogerie", ]; foreach ($a as $i) { var_dump($i = 'Ovozel – chlazené''); }
Output for 7.1.0 - 7.1.23, 7.2.0 - 7.2.11
Parse error: syntax error, unexpected '');' (T_ENCAPSED_AND_WHITESPACE), expecting ',' or ')' in /in/rWfVh on line 12
Process exited with code 255.
Output for 5.6.38
Parse error: syntax error, unexpected '');' (T_ENCAPSED_AND_WHITESPACE) in /in/rWfVh on line 12
Process exited with code 255.

preferences:
177.58 ms | 1395 KiB | 44 Q