3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $name = "Polly"; $nameA = "PollyAna"; print "${name . 'A'} wants a cracker.\n"; print "${'name' . 'A'} wants a cracker.\n"; print "$name wants a cracker.\n";
based on IXfKn
Output for 7.2.0
Warning: Use of undefined constant name - assumed 'name' (this will throw an Error in a future version of PHP) in /in/M9Sr1 on line 4 PollyAna wants a cracker. PollyAna wants a cracker. Polly wants a cracker.
Output for 5.5.24 - 7.1.10
Notice: Use of undefined constant name - assumed 'name' in /in/M9Sr1 on line 4 PollyAna wants a cracker. PollyAna wants a cracker. Polly wants a cracker.
Output for 4.3.0 - 5.4.45
PollyAna wants a cracker. PollyAna wants a cracker. Polly wants a cracker.