3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $field = 'aut.date AS "date_inscription"'; if(strpos($field, 'aut.') === 0) { $_field = explode('.', $field); $aliasSuffix = $_field[1]; if(strpos($field, 'AS')!=-1) { $_aliasSuffix = explode('AS', $_field[1]); $aliasSuffix = str_replace(array('"', "'"), '', trim($_aliasSuffix[1])); } } echo "aliasSuffix=$aliasSuffix";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
aliasSuffix=date_inscription