3v4l.org

run code in 300+ 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; }

preferences:
53.58 ms | 402 KiB | 5 Q