3v4l.org

run code in 200+ PHP versions simultaneously
<?php $input = '@string@'; bug($input); print $input; function bug(&$value) { switch($value) { case ')': return 1; case '{': return 2; case '}': return 3; case ':': return 4; case ',': return 5; default: $type = 6; break; } if (true) { $value = trim($value, '@'); $type = 7; } return $type; }
based on 141Lt
Output for 5.5.0 - 7.0.4, 7.0.6 - 7.4.1
string
Output for 7.0.5
@string@