3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $serialized = <<<ROLES a:2:{i:0;s:16:"ROLE_SUPER_ADMIN";i:1;s:10:"ROLE_ADMIN";} ROLES; $roles = unserialize($serialized); $roles[] = 'ROLE_SONATA_ADMIN'; var_dump(serialize($roles));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(85) "a:3:{i:0;s:16:"ROLE_SUPER_ADMIN";i:1;s:10:"ROLE_ADMIN";i:2;s:17:"ROLE_SONATA_ADMIN";}"