3v4l.org

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

preferences:
57.32 ms | 402 KiB | 5 Q