3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $user = new stdClass(); $user->id = 1; $user->name = 'johndoe'; $foobar = array('foo' => 'bar', 'user' => $user); echo serialize($foobar);
Output for 4.3.0 - 7.2.0
a:2:{s:3:"foo";s:3:"bar";s:4:"user";O:8:"stdClass":2:{s:2:"id";i:1;s:4:"name";s:7:"johndoe";}}