3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $addr = "http://www.example.com/?pk_lol=VAgin&utm_campaign=printemps&utm_medium=e-mail&utm_source=newsletter1&utm_content=lien-en-haut"; $pattern ="/(utm_campaign=.[^&]+)?(utm_medium=.[^&]+)?(utm_source=.[^&]+)?/"; preg_match($pattern, $addr, $result); echo ">> " . $result[2] . "\n"; echo $addr;
Output for 5.3.28 - 5.3.29, 5.4.20 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined offset: 2 in /in/SC0bS on line 9 >> http://www.example.com/?pk_lol=VAgin&utm_campaign=printemps&utm_medium=e-mail&utm_source=newsletter1&utm_content=lien-en-haut
Output for hhvm-3.12.0
Notice: Undefined index: 2 in /in/SC0bS on line 9 >> http://www.example.com/?pk_lol=VAgin&utm_campaign=printemps&utm_medium=e-mail&utm_source=newsletter1&utm_content=lien-en-haut
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.19
Notice: Undefined offset: 2 in /in/FJ3ne on line 9 >> http://www.example.com/?pk_lol=VAgin&utm_campaign=printemps&utm_medium=e-mail&utm_source=newsletter1&utm_content=lien-en-haut
Output for 4.3.1 - 5.2.17
Notice: Undefined offset: 2 in /in/FJ3ne on line 9 >> http://www.example.com/?pk_lol=VAgin&utm_campaign=printemps&utm_medium=e-mail&utm_source=newsletter1&utm_content=lien-en-haut
Output for 4.3.0
Notice: Undefined offset: 2 in /in/SC0bS on line 9 >> http://www.example.com/?pk_lol=VAgin&utm_campaign=printemps&utm_medium=e-mail&utm_source=newsletter1&utm_content=lien-en-haut