3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = '111'; $a = preg_replace('#^111$#', '222', $a); var_dump($a);

preferences:
31.89 ms | 402 KiB | 5 Q