3v4l.org

run code in 300+ PHP versions simultaneously
<?php $agent = 'test+agent'; $agent = split('\+', $agent); $first = substr($agent[0],0,1); $last = $agent[1]; $agent= $first.$last; echo $agent;

preferences:
56.22 ms | 402 KiB | 5 Q