3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $my_url = "http://www.imdb.com/title/tt1840309/?ref_=hm_cht_t1"; function GetIMDBTitle($url) { $pass1=array(); $pass1 = explode("imdb.com/title/",$url); print_r($pass1); return $pass1[1]; } echo GetIMDBTitle(my_url); ?>
Output for 7.2.0
Warning: Use of undefined constant my_url - assumed 'my_url' (this will throw an Error in a future version of PHP) in /in/Zub0Q on line 15 Array ( [0] => my_url ) Notice: Undefined offset: 1 in /in/Zub0Q on line 11
Output for 5.3.0 - 7.1.10
Notice: Use of undefined constant my_url - assumed 'my_url' in /in/Zub0Q on line 15 Array ( [0] => my_url ) Notice: Undefined offset: 1 in /in/Zub0Q on line 11
Output for 4.3.0 - 5.2.17
Notice: Use of undefined constant my_url - assumed 'my_url' in /in/Zub0Q on line 15 Array ( [0] => my_url ) Notice: Undefined offset: 1 in /in/Zub0Q on line 11