3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $parts = explode('.', 'Student.Nationality.nationality'); $field = array_pop($parts); $model = array_pop($parts); var_dump($field); var_dump($model); var_dump($parts);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(11) "nationality" string(11) "Nationality" array(1) { [0]=> string(7) "Student" }