3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $firstname = "Peter"; $lastname = "Griffin"; $age = "38"; $result = compact("firstname", "lastname", "age"); print_r($result);
Output for 4.3.0 - 7.2.0
Array ( [firstname] => Peter [lastname] => Griffin [age] => 38 )