3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $url = 'http://test.com'; var_dump(current($url)); $url = ['http://test.com']; var_dump(current($url));
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.8
Warning: current() expects parameter 1 to be array, string given in /in/51kpB on line 4 NULL string(15) "http://test.com"
Output for hhvm-3.15.4
Warning: Invalid operand type was used: expecting an array in /in/51kpB on line 4 bool(false) string(15) "http://test.com"