3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace Foo\PHP7; class Foo {} namespace Foo\PHP5; class Foo {} namespace Foo; var_Dump(version_compare(PHP_VERSION, '7.0.0', '<')); if (version_compare(PHP_VERSION, '7.0.0', '<')) { echo PHP_VERSION; class_alias('\Foo\PHP5\Foo', '\Foo\Foo'); } else { echo PHP_VERSION; class_alias('\Foo\PHP7\Foo', '\Foo\Foo'); } $a = new \Foo\Foo(); var_Dump(get_class($a));
based on c4Wi7
Output for 7.3.0alpha1
bool(false) 7.3.0alpha1string(12) "Foo\PHP7\Foo"
Output for 7.2.6
bool(false) 7.2.6string(12) "Foo\PHP7\Foo"
Output for 7.2.5
bool(false) 7.2.5string(12) "Foo\PHP7\Foo"
Output for 7.2.0
bool(false) 7.2.0string(12) "Foo\PHP7\Foo"
Output for 7.1.7
bool(false) 7.1.7string(12) "Foo\PHP7\Foo"
Output for 7.1.6
bool(false) 7.1.6string(12) "Foo\PHP7\Foo"
Output for 7.1.5
bool(false) 7.1.5string(12) "Foo\PHP7\Foo"
Output for 7.1.0
bool(false) 7.1.0string(12) "Foo\PHP7\Foo"
Output for 7.0.20
bool(false) 7.0.20string(12) "Foo\PHP7\Foo"
Output for 7.0.6
bool(false) 7.0.6string(12) "Foo\PHP7\Foo"
Output for 7.0.5
bool(false) 7.0.5string(12) "Foo\PHP7\Foo"
Output for 7.0.4
bool(false) 7.0.4string(12) "Foo\PHP7\Foo"
Output for 7.0.3
bool(false) 7.0.3string(12) "Foo\PHP7\Foo"
Output for 7.0.2
bool(false) 7.0.2string(12) "Foo\PHP7\Foo"
Output for 7.0.1
bool(false) 7.0.1string(12) "Foo\PHP7\Foo"
Output for 7.0.0
bool(false) 7.0.0string(12) "Foo\PHP7\Foo"
Output for 5.6.28
bool(true) 5.6.28string(12) "Foo\PHP5\Foo"
Output for 5.6.21
bool(true) 5.6.21string(12) "Foo\PHP5\Foo"
Output for 5.6.20
bool(true) 5.6.20string(12) "Foo\PHP5\Foo"
Output for 5.6.19
bool(true) 5.6.19string(12) "Foo\PHP5\Foo"
Output for 5.6.18
bool(true) 5.6.18string(12) "Foo\PHP5\Foo"
Output for 5.6.17
bool(true) 5.6.17string(12) "Foo\PHP5\Foo"
Output for 5.6.16
bool(true) 5.6.16string(12) "Foo\PHP5\Foo"
Output for 5.6.15
bool(true) 5.6.15string(12) "Foo\PHP5\Foo"
Output for 5.6.14
bool(true) 5.6.14string(12) "Foo\PHP5\Foo"
Output for 5.6.13
bool(true) 5.6.13string(12) "Foo\PHP5\Foo"
Output for 5.6.12
bool(true) 5.6.12string(12) "Foo\PHP5\Foo"
Output for 5.6.11
bool(true) 5.6.11string(12) "Foo\PHP5\Foo"
Output for 5.6.10
bool(true) 5.6.10string(12) "Foo\PHP5\Foo"
Output for 5.6.9
bool(true) 5.6.9string(12) "Foo\PHP5\Foo"
Output for 5.6.8
bool(true) 5.6.8string(12) "Foo\PHP5\Foo"
Output for 5.6.7
bool(true) 5.6.7string(12) "Foo\PHP5\Foo"
Output for 5.5.35
bool(true) 5.5.35string(12) "Foo\PHP5\Foo"
Output for 5.5.34
bool(true) 5.5.34string(12) "Foo\PHP5\Foo"
Output for 5.5.33
bool(true) 5.5.33string(12) "Foo\PHP5\Foo"
Output for 5.5.32
bool(true) 5.5.32string(12) "Foo\PHP5\Foo"
Output for 5.5.31
bool(true) 5.5.31string(12) "Foo\PHP5\Foo"
Output for 5.5.30
bool(true) 5.5.30string(12) "Foo\PHP5\Foo"
Output for 5.5.29
bool(true) 5.5.29string(12) "Foo\PHP5\Foo"
Output for 5.5.28
bool(true) 5.5.28string(12) "Foo\PHP5\Foo"
Output for 5.5.27
bool(true) 5.5.27string(12) "Foo\PHP5\Foo"
Output for 5.5.26
bool(true) 5.5.26string(12) "Foo\PHP5\Foo"
Output for 5.5.25
bool(true) 5.5.25string(12) "Foo\PHP5\Foo"
Output for 5.5.24
bool(true) 5.5.24string(12) "Foo\PHP5\Foo"
Output for 5.4.45
bool(true) 5.4.45string(12) "Foo\PHP5\Foo"
Output for 5.4.44
bool(true) 5.4.44string(12) "Foo\PHP5\Foo"
Output for 5.4.43
bool(true) 5.4.43string(12) "Foo\PHP5\Foo"
Output for 5.4.42
bool(true) 5.4.42string(12) "Foo\PHP5\Foo"
Output for 5.4.41
bool(true) 5.4.41string(12) "Foo\PHP5\Foo"
Output for 5.4.40
bool(true) 5.4.40string(12) "Foo\PHP5\Foo"
Output for 5.4.39
bool(true) 5.4.39string(12) "Foo\PHP5\Foo"
Output for 5.4.38
bool(true) 5.4.38string(12) "Foo\PHP5\Foo"
Output for 5.4.37
bool(true) 5.4.37string(12) "Foo\PHP5\Foo"
Output for 5.4.36
bool(true) 5.4.36string(12) "Foo\PHP5\Foo"
Output for 5.4.35
bool(true) 5.4.35string(12) "Foo\PHP5\Foo"
Output for 5.4.34
bool(true) 5.4.34string(12) "Foo\PHP5\Foo"
Output for 5.4.32
bool(true) 5.4.32string(12) "Foo\PHP5\Foo"
Output for 5.4.31
bool(true) 5.4.31string(12) "Foo\PHP5\Foo"
Output for 5.4.30
bool(true) 5.4.30string(12) "Foo\PHP5\Foo"
Output for 5.4.29
bool(true) 5.4.29string(12) "Foo\PHP5\Foo"
Output for 5.4.28
bool(true) 5.4.28string(12) "Foo\PHP5\Foo"
Output for 5.4.27
bool(true) 5.4.27string(12) "Foo\PHP5\Foo"
Output for 5.4.26
bool(true) 5.4.26string(12) "Foo\PHP5\Foo"
Output for 5.4.25
bool(true) 5.4.25string(12) "Foo\PHP5\Foo"
Output for 5.4.24
bool(true) 5.4.24string(12) "Foo\PHP5\Foo"
Output for 5.4.23
bool(true) 5.4.23string(12) "Foo\PHP5\Foo"
Output for 5.4.22
bool(true) 5.4.22string(12) "Foo\PHP5\Foo"
Output for 5.4.21
bool(true) 5.4.21string(12) "Foo\PHP5\Foo"
Output for 5.4.20
bool(true) 5.4.20string(12) "Foo\PHP5\Foo"
Output for 5.4.19
bool(true) 5.4.19 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.18
bool(true) 5.4.18 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.17
bool(true) 5.4.17 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.16
bool(true) 5.4.16 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.15
bool(true) 5.4.15 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.14
bool(true) 5.4.14 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.13
bool(true) 5.4.13 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.12
bool(true) 5.4.12 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.11
bool(true) 5.4.11 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.10
bool(true) 5.4.10 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.9
bool(true) 5.4.9 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.8
bool(true) 5.4.8 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.7
bool(true) 5.4.7 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.6
bool(true) 5.4.6 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.5
bool(true) 5.4.5 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.4
bool(true) 5.4.4 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.3
bool(true) 5.4.3 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.2
bool(true) 5.4.2 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.1
bool(true) 5.4.1 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.4.0
bool(true) 5.4.0 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.29
bool(true) 5.3.29 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.28
bool(true) 5.3.28 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.27
bool(true) 5.3.27 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.26
bool(true) 5.3.26 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.25
bool(true) 5.3.25 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.24
bool(true) 5.3.24 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.23
bool(true) 5.3.23 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.22
bool(true) 5.3.22 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.21
bool(true) 5.3.21 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.20
bool(true) 5.3.20 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.19
bool(true) 5.3.19 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.18
bool(true) 5.3.18 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.17
bool(true) 5.3.17 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.16
bool(true) 5.3.16 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.15
bool(true) 5.3.15 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.14
bool(true) 5.3.14 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.13
bool(true) 5.3.13 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.12
bool(true) 5.3.12 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.11
bool(true) 5.3.11 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.10
bool(true) 5.3.10 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.9
bool(true) 5.3.9 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.8
bool(true) 5.3.8 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.7
bool(true) 5.3.7 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.6
bool(true) 5.3.6 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.5
bool(true) 5.3.5 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.4
bool(true) 5.3.4 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.3
bool(true) 5.3.3 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.2
bool(true) 5.3.2 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.1
bool(true) 5.3.1 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 5.3.0
bool(true) 5.3.0 Fatal error: Class 'Foo\Foo' not found in /in/tmn9I on line 19
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/tmn9I on line 3
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 T_STRING in /in/tmn9I on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/tmn9I on line 3
Process exited with code 255.