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