3v4l.org

run code in 200+ PHP versions simultaneously
<?php $int = 'intruder'; define('con', '"smart"'); // Use a closure (anomynous function) like so: $_ = function ($val){return $val;}; $doc = <<<TXT Hi there, One day I caught this $int nearby. I was then told that actually other {$_(con)} $int was there before. So who came first, the chicken or the egg? TXT; echo $doc;
Output for 5.6.38 - 7.4.0
Hi there, One day I caught this intruder nearby. I was then told that actually other "smart" intruder was there before. So who came first, the chicken or the egg?