3v4l.org

run code in 300+ PHP versions simultaneously
<?php $p='/dir/dir2/dir3/'; $p = rtrim($p, '/'); echo $p;

preferences:
44.59 ms | 407 KiB | 5 Q