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.0alpha1')); if (version_compare(PHP_VERSION, '7.0.0alpha1', '<')) { 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 a2jBB
Output for 7.3.0alpha1
int(1) 7.3.0alpha1string(12) "Foo\PHP7\Foo"
Output for 7.2.6
int(1) 7.2.6string(12) "Foo\PHP7\Foo"
Output for 7.2.5
int(1) 7.2.5string(12) "Foo\PHP7\Foo"
Output for 7.2.0
int(1) 7.2.0string(12) "Foo\PHP7\Foo"
Output for 7.1.7
int(1) 7.1.7string(12) "Foo\PHP7\Foo"
Output for 7.1.6
int(1) 7.1.6string(12) "Foo\PHP7\Foo"
Output for 7.1.5
int(1) 7.1.5string(12) "Foo\PHP7\Foo"
Output for 7.1.0
int(1) 7.1.0string(12) "Foo\PHP7\Foo"
Output for 7.0.20
int(1) 7.0.20string(12) "Foo\PHP7\Foo"
Output for 7.0.6
int(1) 7.0.6string(12) "Foo\PHP7\Foo"
Output for 7.0.5
int(1) 7.0.5string(12) "Foo\PHP7\Foo"
Output for 7.0.4
int(1) 7.0.4string(12) "Foo\PHP7\Foo"
Output for 7.0.3
int(1) 7.0.3string(12) "Foo\PHP7\Foo"
Output for 7.0.2
int(1) 7.0.2string(12) "Foo\PHP7\Foo"
Output for 7.0.1
int(1) 7.0.1string(12) "Foo\PHP7\Foo"
Output for 7.0.0
int(1) 7.0.0string(12) "Foo\PHP7\Foo"
Output for 5.6.28
int(-1) 5.6.28string(12) "Foo\PHP5\Foo"
Output for 5.6.21
int(-1) 5.6.21string(12) "Foo\PHP5\Foo"
Output for 5.6.20
int(-1) 5.6.20string(12) "Foo\PHP5\Foo"
Output for 5.6.19
int(-1) 5.6.19string(12) "Foo\PHP5\Foo"
Output for 5.6.18
int(-1) 5.6.18string(12) "Foo\PHP5\Foo"
Output for 5.6.17
int(-1) 5.6.17string(12) "Foo\PHP5\Foo"
Output for 5.6.16
int(-1) 5.6.16string(12) "Foo\PHP5\Foo"
Output for 5.6.15
int(-1) 5.6.15string(12) "Foo\PHP5\Foo"
Output for 5.6.14
int(-1) 5.6.14string(12) "Foo\PHP5\Foo"
Output for 5.6.13
int(-1) 5.6.13string(12) "Foo\PHP5\Foo"
Output for 5.6.12
int(-1) 5.6.12string(12) "Foo\PHP5\Foo"
Output for 5.6.11
int(-1) 5.6.11string(12) "Foo\PHP5\Foo"
Output for 5.6.10
int(-1) 5.6.10string(12) "Foo\PHP5\Foo"
Output for 5.6.9
int(-1) 5.6.9string(12) "Foo\PHP5\Foo"
Output for 5.6.8
int(-1) 5.6.8string(12) "Foo\PHP5\Foo"
Output for 5.5.35
int(-1) 5.5.35string(12) "Foo\PHP5\Foo"
Output for 5.5.34
int(-1) 5.5.34string(12) "Foo\PHP5\Foo"
Output for 5.5.33
int(-1) 5.5.33string(12) "Foo\PHP5\Foo"
Output for 5.5.32
int(-1) 5.5.32string(12) "Foo\PHP5\Foo"
Output for 5.5.31
int(-1) 5.5.31string(12) "Foo\PHP5\Foo"
Output for 5.5.30
int(-1) 5.5.30string(12) "Foo\PHP5\Foo"
Output for 5.5.29
int(-1) 5.5.29string(12) "Foo\PHP5\Foo"
Output for 5.5.28
int(-1) 5.5.28string(12) "Foo\PHP5\Foo"
Output for 5.5.27
int(-1) 5.5.27string(12) "Foo\PHP5\Foo"
Output for 5.5.26
int(-1) 5.5.26string(12) "Foo\PHP5\Foo"
Output for 5.5.25
int(-1) 5.5.25string(12) "Foo\PHP5\Foo"
Output for 5.5.24
int(-1) 5.5.24string(12) "Foo\PHP5\Foo"
Output for 5.4.45
int(-1) 5.4.45string(12) "Foo\PHP5\Foo"
Output for 5.4.44
int(-1) 5.4.44string(12) "Foo\PHP5\Foo"
Output for 5.4.43
int(-1) 5.4.43string(12) "Foo\PHP5\Foo"
Output for 5.4.42
int(-1) 5.4.42string(12) "Foo\PHP5\Foo"
Output for 5.4.41
int(-1) 5.4.41string(12) "Foo\PHP5\Foo"
Output for 5.4.40
int(-1) 5.4.40string(12) "Foo\PHP5\Foo"
Output for 5.4.39
int(-1) 5.4.39string(12) "Foo\PHP5\Foo"
Output for 5.4.38
int(-1) 5.4.38string(12) "Foo\PHP5\Foo"
Output for 5.4.37
int(-1) 5.4.37string(12) "Foo\PHP5\Foo"
Output for 5.4.36
int(-1) 5.4.36string(12) "Foo\PHP5\Foo"
Output for 5.4.35
int(-1) 5.4.35string(12) "Foo\PHP5\Foo"
Output for 5.4.34
int(-1) 5.4.34string(12) "Foo\PHP5\Foo"
Output for 5.4.32
int(-1) 5.4.32string(12) "Foo\PHP5\Foo"
Output for 5.4.31
int(-1) 5.4.31string(12) "Foo\PHP5\Foo"
Output for 5.4.30
int(-1) 5.4.30string(12) "Foo\PHP5\Foo"
Output for 5.4.29
int(-1) 5.4.29string(12) "Foo\PHP5\Foo"
Output for 5.4.28
int(-1) 5.4.28string(12) "Foo\PHP5\Foo"
Output for 5.4.27
int(-1) 5.4.27string(12) "Foo\PHP5\Foo"
Output for 5.4.26
int(-1) 5.4.26string(12) "Foo\PHP5\Foo"
Output for 5.4.25
int(-1) 5.4.25string(12) "Foo\PHP5\Foo"
Output for 5.4.24
int(-1) 5.4.24string(12) "Foo\PHP5\Foo"
Output for 5.4.23
int(-1) 5.4.23string(12) "Foo\PHP5\Foo"
Output for 5.4.22
int(-1) 5.4.22string(12) "Foo\PHP5\Foo"
Output for 5.4.21
int(-1) 5.4.21string(12) "Foo\PHP5\Foo"
Output for 5.4.20
int(-1) 5.4.20string(12) "Foo\PHP5\Foo"
Output for 5.4.19
int(-1) 5.4.19 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.18
int(-1) 5.4.18 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.17
int(-1) 5.4.17 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.16
int(-1) 5.4.16 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.15
int(-1) 5.4.15 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.14
int(-1) 5.4.14 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.13
int(-1) 5.4.13 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.12
int(-1) 5.4.12 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.11
int(-1) 5.4.11 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.10
int(-1) 5.4.10 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.9
int(-1) 5.4.9 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.8
int(-1) 5.4.8 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.7
int(-1) 5.4.7 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.6
int(-1) 5.4.6 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.5
int(-1) 5.4.5 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.4
int(-1) 5.4.4 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.3
int(-1) 5.4.3 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.2
int(-1) 5.4.2 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.1
int(-1) 5.4.1 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.4.0
int(-1) 5.4.0 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.29
int(-1) 5.3.29 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.28
int(-1) 5.3.28 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.27
int(-1) 5.3.27 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.26
int(-1) 5.3.26 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.25
int(-1) 5.3.25 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.24
int(-1) 5.3.24 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.23
int(-1) 5.3.23 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.22
int(-1) 5.3.22 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.21
int(-1) 5.3.21 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.20
int(-1) 5.3.20 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.19
int(-1) 5.3.19 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.18
int(-1) 5.3.18 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.17
int(-1) 5.3.17 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.16
int(-1) 5.3.16 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.15
int(-1) 5.3.15 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.14
int(-1) 5.3.14 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.13
int(-1) 5.3.13 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.12
int(-1) 5.3.12 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.11
int(-1) 5.3.11 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.10
int(-1) 5.3.10 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.9
int(-1) 5.3.9 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.8
int(-1) 5.3.8 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.7
int(-1) 5.3.7 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.6
int(-1) 5.3.6 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.5
int(-1) 5.3.5 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.4
int(-1) 5.3.4 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.3
int(-1) 5.3.3 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.2
int(-1) 5.3.2 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.1
int(-1) 5.3.1 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
Process exited with code 255.
Output for 5.3.0
int(-1) 5.3.0 Fatal error: Class 'Foo\Foo' not found in /in/ZGlIZ on line 20
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/ZGlIZ 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/ZGlIZ on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/ZGlIZ on line 3
Process exited with code 255.