3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $chapter_full_path = "/last/"; $chapter_path_name = "last"; $chapter_path_name_length=strlen($chapter_path_name); $oldParentFullPathLength = strlen($chapter_full_path) - $chapter_path_name_length; $oldParentFullPath=substr($chapter_full_path,0,$oldParentFullPathLength-1); echo $oldParentFullPath;
based on vCGfv
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
/
Output for hhvm-3.10.0

Process exited with code 153.