3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $value = "Gewerbe"; echo "Vor: " . $value; $value = preg_replace('/^(P|G).*$/', "$1", $value); echo "Nach: " . $value; ?>
based on H692X
Output for 5.6.0 - 7.3.0alpha1
Vor: GewerbeNach: G