3v4l.org

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

preferences:
57.56 ms | 402 KiB | 5 Q