3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define("DEFINE",1); define("HELLO", 'this_exists'); define("this_doesnt_exist", "HELLO"); $vvar = "this_doesnt_exist"; var_dump( defined("DEFINE"), // true expected defined(DEFINE), // false expected defined("HELLO"), // true expected defined(this_doesnt_exist), // true expected defined($vvar) // true expected );
Output for 4.3.5 - 7.1.0
bool(true) bool(false) bool(true) bool(true) bool(true)
Output for 4.3.0 - 4.3.4
int(1) int(0) int(1) int(1) int(1)