3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 'charanjeet/working/with/php'; echo strrpos($foo, '/', -5); echo (bool)strrpos($foo, '/', -5); //Answer: 18 => It will start searching it reverse direction after ignoring 5 five characters. //It will then return the position of the / after working, from the beginning charanjeet/working/ gạch / ở vị trí 18

preferences:
69.42 ms | 402 KiB | 5 Q