3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Foo; define('Foo\\true', 1); define('Foo\\TRUE', 2); var_dump( true, TRUE, \true, \TRUE, array_slice(get_defined_constants(), -4) );
Output for 7.0.0 - 7.1.0
bool(true) bool(true) bool(true) bool(true) array(4) { ["STDOUT"]=> resource(2) of type (stream) ["STDERR"]=> resource(3) of type (stream) ["Foo\true"]=> int(1) ["Foo\TRUE"]=> int(2) }
Output for hhvm-3.12.0
bool(true) bool(true) bool(true) bool(true) array(4) { ["CURLOPT_QUOTE"]=> int(10028) ["FILTER_SANITIZE_MAGIC_QUOTES"]=> int(521) ["SIGCHLD"]=> int(17) ["SOAP_COMPRESSION_GZIP"]=> int(0) }
Output for hhvm-3.10.0
bool(true) bool(true) bool(true) bool(true) array(4) { ["FILTER_SANITIZE_MAGIC_QUOTES"]=> int(521) ["SIGCHLD"]=> int(17) ["DEBUG_LOG_IP"]=> int(64) ["SOAP_COMPRESSION_GZIP"]=> int(0) }
Output for 5.3.0 - 5.6.21
int(1) int(2) bool(true) bool(true) array(4) { ["STDOUT"]=> resource(2) of type (stream) ["STDERR"]=> resource(3) of type (stream) ["Foo\true"]=> int(1) ["Foo\TRUE"]=> int(2) }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/AEY3T 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 T_STRING in /in/AEY3T on line 2
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/AEY3T on line 2
Process exited with code 255.