3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $fullName = 'Foo!"bar" Baz ø hello!<strong>poop</strong>'; $fullName = filter_var($fullName, FILTER_CALLBACK, ['options'=>function($value) { $value = trim($value); // strip tags $value = strip_tags($value); // remove double quotes $value = preg_replace('/["<>\{\}\[\]]+/', '', $value); return $value; }]); echo "$fullName\n";
based on QkO46
Output for 5.4.1 - 7.2.0
Foo!bar Baz ø hello!poop
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/LHNTT on line 4
Process exited with code 255.