3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $daysData = array('1MO'); $weekDay = substr($daysData[0], - 2); $dayPosition = substr($daysData[0], 0, strlen($daysData[0] - 2)); var_dump($weekDay, $dayPosition);
Output for 7.1.0 - 7.2.0
Notice: A non well formed numeric value encountered in /in/RZe7G on line 6 string(2) "MO" string(2) "1M"
Output for 5.3.22 - 7.0.20
string(2) "MO" string(2) "1M"