3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'prefix.column alias'; $pos = strpos ($str, '.'); $prefix = substr ($str, 0, $pos); $name = substr($str, $pos + 1); $posr = strrpos ($name, ' '); $alias = substr ($name, $posr + 1); var_dump ($prefix, $name, $alias); //echo substr ($str, $pos + 1, $posr - $pos - 1);
based on GnNvS
Output for 5.6.0 - 7.3.0beta1
string(6) "prefix" string(12) "column alias" string(5) "alias"