3v4l.org

run code in 300+ PHP versions simultaneously
<?php $recipients = "john('john@yahoo.com'), frank('frank@gmail.com'),simon('simon@to.com')"; preg_match_all("/(?:, ?)?([^(]+)\('([^']+)'\)/", $recipients, $matches, PREG_SET_ORDER); var_export( array_map( fn($row) => ['name' => $row[1], 'email' => $row[2]], $matches ) );

preferences:
13.73 ms | 406 KiB | 5 Q