3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = <<<STRING array ( 2 => 'authenticated user', 3 => 'administrator', 6 => 'employee', ) STRING; $string2 = var_export(array(2 => 'authenticated user', 3 => 'administrator', 6 => 'employee'), TRUE); eval('$foo = $string;'); eval('$bar = ' . $string2 . ';'); var_dump($foo); var_dump($bar);
based on YqsdP
Output for 4.3.0 - 7.2.0
string(81) "array ( 2 => 'authenticated user', 3 => 'administrator', 6 => 'employee', )" array(3) { [2]=> string(18) "authenticated user" [3]=> string(13) "administrator" [6]=> string(8) "employee" }