3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print_r(get_declared_classes()[-1]); class A {} print_r(get_declared_classes()[130]);
Output for 7.1.0
Notice: Undefined offset: -1 in /in/rK8X6 on line 2 Phar
Output for 7.0.6 - 7.0.14
Notice: Undefined offset: -1 in /in/rK8X6 on line 2 XMLReader
Output for 7.0.5
Notice: Undefined offset: -1 in /in/rK8X6 on line 2 PharFileInfo
Output for 7.0.0 - 7.0.4
Notice: Undefined offset: -1 in /in/rK8X6 on line 2 ReflectionFunctionAbstract
Output for hhvm-3.12.0
Notice: Undefined index: -1 in /in/rK8X6 on line 2 LazySliceKeyedIterator
Output for hhvm-3.10.0
Notice: Undefined index: -1 in /in/rK8X6 on line 6 mysqli_driver
Output for 5.6.8 - 5.6.12, 5.6.28
Notice: Undefined offset: -1 in /in/rK8X6 on line 2 ResourceBundle
Output for 5.5.24 - 5.5.28, 5.5.35, 5.6.21
Notice: Undefined offset: -1 in /in/rK8X6 on line 2 Transliterator
Output for 5.4.0 - 5.4.32, 5.5.29 - 5.5.30, 5.5.34, 5.6.13 - 5.6.15, 5.6.20
Notice: Undefined offset: -1 in /in/rK8X6 on line 2 Notice: Undefined offset: 130 in /in/rK8X6 on line 6
Output for 5.6.16 - 5.6.19
Notice: Undefined offset: -1 in /in/rK8X6 on line 2 ReflectionExtension
Output for 5.5.31 - 5.5.33
Notice: Undefined offset: -1 in /in/rK8X6 on line 2 ReflectionZendExtension
Output for 5.4.34 - 5.4.45
Notice: Undefined offset: -1 in /in/rK8X6 on line 2 A
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/rK8X6 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/rK8X6 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/rK8X6 on line 2
Process exited with code 255.