3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $week = "Monday,Tuesday,Wednesay,Thursday,Friday,Saturday,Sunday"; $result = array_splice( explode(',', $week), -2 ); var_dump($result);
based on K97tv
Output for 7.0.0 - 7.2.0
Notice: Only variables should be passed by reference in /in/uFKdh on line 5 array(2) { [0]=> string(8) "Saturday" [1]=> string(6) "Sunday" }
Output for 5.3.19 - 5.6.28
Strict Standards: Only variables should be passed by reference in /in/uFKdh on line 5 array(2) { [0]=> string(8) "Saturday" [1]=> string(6) "Sunday" }