3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'hello'; echo substr($str, 0, -1);

preferences:
35.77 ms | 402 KiB | 5 Q