3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'adg'; preg_match('/([abc])([def])/', $string, $r); print_r($r); preg_match('/([abc])([def])/', $string, $r, PREG_OFFSET_CAPTURE); print_r($r); ?>

preferences:
74.01 ms | 2918 KiB | 5 Q