3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = '/* name for an item that is duplicated in the UI, based on the original name / "%@ (Copy)" = "%@ (kopi)"; / display name for a book page template that is the first page of that section / "%@ (First)" = "%@ (Første)"; / display name for a book page template that represents a hardcover cover. the second argument is the cover type. */ "%@ (Hardcover, %@)" = "%1$@ (Hard innbinding, %2$@)";'; preg_match_all('#"([^"]+)"\s*=\s*"([^"]+)";#', $text, $match); $translate = array_combine($match[1], $match[2]); print_r($translate);
Output for 5.0.0 - 7.1.0
Array ( [%@ (Copy)] => %@ (kopi) [%@ (First)] => %@ (Første) [%@ (Hardcover, %@)] => %1$@ (Hard innbinding, %2$@) )
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_combine() in /in/OsVQd on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_combine() in /in/OsVQd on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_combine() in /in/OsVQd on line 4