3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = 'Al(OH)3'; $n = preg_replace('/.*OH\)(\d)/i', '$1', $c); echo $n;

preferences:
54.6 ms | 402 KiB | 5 Q