3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $name = "Polly"; print "${name . 'Ana'} wants a cracker.\n"; print "${'name' . 'Ana'} wants a cracker.\n"; print "$name wants a cracker.\n";
based on gLEvq
Output for 5.5.24 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Use of undefined constant name - assumed 'name' in /in/IXfKn on line 3 Notice: Undefined variable: nameAna in /in/IXfKn on line 3 wants a cracker. Notice: Undefined variable: nameAna in /in/IXfKn on line 4 wants a cracker. Polly wants a cracker.
Output for 5.0.4 - 5.4.45
Notice: Undefined variable: nameAna in /in/IXfKn on line 3 wants a cracker. Notice: Undefined variable: nameAna in /in/IXfKn on line 4 wants a cracker. Polly wants a cracker.
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: nameAna in /in/IXfKn on line 3 wants a cracker. Notice: Undefined variable: nameAna in /in/IXfKn on line 4 wants a cracker. Polly wants a cracker.