3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $className = "SplFileInfo"; $serializedString = sprintf( '%s:%d:"%s":0:{}', 'C', strlen($className), $className ); $instance = unserialize($serializedString); var_dump($instance);
based on jqvE2
Output for 7.0.0 - 7.1.0
Fatal error: Uncaught Exception: Unserialization of 'SplFileInfo' is not allowed in /in/F1MiT:11 Stack trace: #0 /in/F1MiT(11): unserialize('C:11:"SplFileIn...') #1 {main} thrown in /in/F1MiT on line 11
Process exited with code 255.
Output for 5.4.14 - 5.6.28
Fatal error: Uncaught exception 'Exception' with message 'Unserialization of 'SplFileInfo' is not allowed' in /in/F1MiT:11 Stack trace: #0 /in/F1MiT(11): unserialize('C:11:"SplFileIn...') #1 {main} thrown in /in/F1MiT on line 11
Process exited with code 255.
Output for 5.3.3 - 5.4.13
Notice: unserialize(): Error at offset 22 of 23 bytes in /in/F1MiT on line 11 Fatal error: Uncaught exception 'Exception' with message 'Unserialization of 'SplFileInfo' is not allowed' in /in/F1MiT:11 Stack trace: #0 /in/F1MiT(11): unserialize('C:11:"SplFileIn...') #1 {main} thrown in /in/F1MiT on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.2
Notice: unserialize(): Error at offset 22 of 23 bytes in /in/F1MiT on line 0 Fatal error: Uncaught exception 'Exception' with message 'Unserialization of 'SplFileInfo' is not allowed' in /in/F1MiT:11 Stack trace: #0 /in/F1MiT(11): unserialize('C:11:"SplFileIn...') #1 {main} thrown in /in/F1MiT on line 11
Process exited with code 255.
Output for 5.1.2 - 5.2.17
Warning: Class SplFileInfo has no unserializer in /in/F1MiT on line 11 Notice: unserialize(): Error at offset 17 of 23 bytes in /in/F1MiT on line 11 bool(false)
Output for 5.1.0 - 5.1.1
Warning: Class __PHP_Incomplete_Class has no unserializer in /in/F1MiT on line 11 Notice: unserialize(): Error at offset 17 of 23 bytes in /in/F1MiT on line 11 bool(false)
Output for 4.3.2 - 5.0.5
Notice: unserialize(): Error at offset 0 of 23 bytes in /in/F1MiT on line 11 bool(false)
Output for 4.3.0 - 4.3.1
Notice: unserialize() [http://www.php.net/function.unserialize]: Error at offset 0 of 23 bytes in /in/F1MiT on line 11 bool(false)