3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Advisor Geologist – HighMount Exploration & Production LLC – Oklahoma City, OK'; $arr = explode( '–', $str); var_dump( $arr, end( $arr)); $last = trim( end( $arr)); echo $last;

preferences:
39.19 ms | 402 KiB | 5 Q