3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $ref = new ReflectionClass('PDO'); foreach ($ref->getConstants() as $key => $value) { printf("%s => %s\n", $key, $value); }
Output for 5.2.3 - 5.6.28, 7.0.0 - 7.1.0
PARAM_BOOL => 5 PARAM_NULL => 0 PARAM_INT => 1 PARAM_STR => 2 PARAM_LOB => 3 PARAM_STMT => 4 PARAM_INPUT_OUTPUT => 2147483648 PARAM_EVT_ALLOC => 0 PARAM_EVT_FREE => 1 PARAM_EVT_EXEC_PRE => 2 PARAM_EVT_EXEC_POST => 3 PARAM_EVT_FETCH_PRE => 4 PARAM_EVT_FETCH_POST => 5 PARAM_EVT_NORMALIZE => 6 FETCH_LAZY => 1 FETCH_ASSOC => 2 FETCH_NUM => 3 FETCH_BOTH => 4 FETCH_OBJ => 5 FETCH_BOUND => 6 FETCH_COLUMN => 7 FETCH_CLASS => 8 FETCH_INTO => 9 FETCH_FUNC => 10 FETCH_GROUP => 65536 FETCH_UNIQUE => 196608 FETCH_KEY_PAIR => 12 FETCH_CLASSTYPE => 262144 FETCH_SERIALIZE => 524288 FETCH_PROPS_LATE => 1048576 FETCH_NAMED => 11 ATTR_AUTOCOMMIT => 0 ATTR_PREFETCH => 1 ATTR_TIMEOUT => 2 ATTR_ERRMODE => 3 ATTR_SERVER_VERSION => 4 ATTR_CLIENT_VERSION => 5 ATTR_SERVER_INFO => 6 ATTR_CONNECTION_STATUS => 7 ATTR_CASE => 8 ATTR_CURSOR_NAME => 9 ATTR_CURSOR => 10 ATTR_ORACLE_NULLS => 11 ATTR_PERSISTENT => 12 ATTR_STATEMENT_CLASS => 13 ATTR_FETCH_TABLE_NAMES => 14 ATTR_FETCH_CATALOG_NAMES => 15 ATTR_DRIVER_NAME => 16 ATTR_STRINGIFY_FETCHES => 17 ATTR_MAX_COLUMN_LEN => 18 ATTR_EMULATE_PREPARES => 20 ATTR_DEFAULT_FETCH_MODE => 19 ERRMODE_SILENT => 0 ERRMODE_WARNING => 1 ERRMODE_EXCEPTION => 2 CASE_NATURAL => 0 CASE_LOWER => 2 CASE_UPPER => 1 NULL_NATURAL => 0 NULL_EMPTY_STRING => 1 NULL_TO_STRING => 2 ERR_NONE => 00000 FETCH_ORI_NEXT => 0 FETCH_ORI_PRIOR => 1 FETCH_ORI_FIRST => 2 FETCH_ORI_LAST => 3 FETCH_ORI_ABS => 4 FETCH_ORI_REL => 5 CURSOR_FWDONLY => 0 CURSOR_SCROLL => 1
Output for hhvm-3.10.0 - 3.12.0
ATTR_FETCH_CATALOG_NAMES => 15 MYSQL_ATTR_USE_BUFFERED_QUERY => 1000 MYSQL_ATTR_MAX_BUFFER_SIZE => 1005 MYSQL_ATTR_READ_DEFAULT_FILE => 1003 MYSQL_ATTR_READ_DEFAULT_GROUP => 1004 PARAM_BOOL => 5 PARAM_NULL => 0 PARAM_INT => 1 PARAM_STR => 2 PARAM_LOB => 3 PARAM_STMT => 4 PARAM_INPUT_OUTPUT => 2147483648 PARAM_EVT_ALLOC => 0 PARAM_EVT_FREE => 1 PARAM_EVT_EXEC_PRE => 2 PARAM_EVT_EXEC_POST => 3 PARAM_EVT_FETCH_PRE => 4 PARAM_EVT_FETCH_POST => 5 PARAM_EVT_NORMALIZE => 6 FETCH_USE_DEFAULT => 0 FETCH_LAZY => 1 FETCH_ASSOC => 2 FETCH_NUM => 3 FETCH_BOTH => 4 FETCH_OBJ => 5 FETCH_BOUND => 6 FETCH_COLUMN => 7 FETCH_CLASS => 8 FETCH_INTO => 9 FETCH_FUNC => 10 FETCH_GROUP => 65536 FETCH_UNIQUE => 196608 FETCH_KEY_PAIR => 12 FETCH_CLASSTYPE => 262144 FETCH_SERIALIZE => 524288 FETCH_PROPS_LATE => 1048576 FETCH_NAMED => 11 ATTR_AUTOCOMMIT => 0 ATTR_PREFETCH => 1 ATTR_TIMEOUT => 2 ATTR_ERRMODE => 3 ATTR_SERVER_VERSION => 4 ATTR_CLIENT_VERSION => 5 ATTR_SERVER_INFO => 6 ATTR_CONNECTION_STATUS => 7 ATTR_CASE => 8 ATTR_CURSOR_NAME => 9 ATTR_CURSOR => 10 ATTR_ORACLE_NULLS => 11 ATTR_PERSISTENT => 12 ATTR_STATEMENT_CLASS => 13 ATTR_FETCH_TABLE_NAMES => 14 ATTR_DRIVER_NAME => 16 ATTR_STRINGIFY_FETCHES => 17 ATTR_MAX_COLUMN_LEN => 18 ATTR_EMULATE_PREPARES => 20 ATTR_DEFAULT_FETCH_MODE => 19 ERRMODE_SILENT => 0 ERRMODE_WARNING => 1 ERRMODE_EXCEPTION => 2 CASE_NATURAL => 0 CASE_LOWER => 2 CASE_UPPER => 1 NULL_NATURAL => 0 NULL_EMPTY_STRING => 1 NULL_TO_STRING => 2 FETCH_ORI_NEXT => 0 FETCH_ORI_PRIOR => 1 FETCH_ORI_FIRST => 2 FETCH_ORI_LAST => 3 FETCH_ORI_ABS => 4 FETCH_ORI_REL => 5 CURSOR_FWDONLY => 0 CURSOR_SCROLL => 1 MYSQL_ATTR_LOCAL_INFILE => 1001 MYSQL_ATTR_INIT_COMMAND => 1002 MYSQL_ATTR_COMPRESS => 1006 MYSQL_ATTR_DIRECT_QUERY => 1007 MYSQL_ATTR_FOUND_ROWS => 1008 MYSQL_ATTR_IGNORE_SPACE => 1009 ERR_NONE => 00000
Output for 5.2.0 - 5.2.2
PARAM_BOOL => 5 PARAM_NULL => 0 PARAM_INT => 1 PARAM_STR => 2 PARAM_LOB => 3 PARAM_STMT => 4 PARAM_INPUT_OUTPUT => 2147483648 PARAM_EVT_ALLOC => 0 PARAM_EVT_FREE => 1 PARAM_EVT_EXEC_PRE => 2 PARAM_EVT_EXEC_POST => 3 PARAM_EVT_FETCH_PRE => 4 PARAM_EVT_FETCH_POST => 5 PARAM_EVT_NORMALIZE => 6 FETCH_LAZY => 1 FETCH_ASSOC => 2 FETCH_NUM => 3 FETCH_BOTH => 4 FETCH_OBJ => 5 FETCH_BOUND => 6 FETCH_COLUMN => 7 FETCH_CLASS => 8 FETCH_INTO => 9 FETCH_FUNC => 10 FETCH_GROUP => 65536 FETCH_UNIQUE => 196608 FETCH_CLASSTYPE => 262144 FETCH_SERIALIZE => 524288 FETCH_PROPS_LATE => 1048576 FETCH_NAMED => 11 ATTR_AUTOCOMMIT => 0 ATTR_PREFETCH => 1 ATTR_TIMEOUT => 2 ATTR_ERRMODE => 3 ATTR_SERVER_VERSION => 4 ATTR_CLIENT_VERSION => 5 ATTR_SERVER_INFO => 6 ATTR_CONNECTION_STATUS => 7 ATTR_CASE => 8 ATTR_CURSOR_NAME => 9 ATTR_CURSOR => 10 ATTR_ORACLE_NULLS => 11 ATTR_PERSISTENT => 12 ATTR_STATEMENT_CLASS => 13 ATTR_FETCH_TABLE_NAMES => 14 ATTR_FETCH_CATALOG_NAMES => 15 ATTR_DRIVER_NAME => 16 ATTR_STRINGIFY_FETCHES => 17 ATTR_MAX_COLUMN_LEN => 18 ATTR_EMULATE_PREPARES => 20 ATTR_DEFAULT_FETCH_MODE => 19 ERRMODE_SILENT => 0 ERRMODE_WARNING => 1 ERRMODE_EXCEPTION => 2 CASE_NATURAL => 0 CASE_LOWER => 2 CASE_UPPER => 1 NULL_NATURAL => 0 NULL_EMPTY_STRING => 1 NULL_TO_STRING => 2 ERR_NONE => 00000 FETCH_ORI_NEXT => 0 FETCH_ORI_PRIOR => 1 FETCH_ORI_FIRST => 2 FETCH_ORI_LAST => 3 FETCH_ORI_ABS => 4 FETCH_ORI_REL => 5 CURSOR_FWDONLY => 0 CURSOR_SCROLL => 1
Output for 5.1.4 - 5.1.6
PARAM_BOOL => 5 PARAM_NULL => 0 PARAM_INT => 1 PARAM_STR => 2 PARAM_LOB => 3 PARAM_STMT => 4 PARAM_INPUT_OUTPUT => 2147483648 PARAM_EVT_ALLOC => 0 PARAM_EVT_FREE => 1 PARAM_EVT_EXEC_PRE => 2 PARAM_EVT_EXEC_POST => 3 PARAM_EVT_FETCH_PRE => 4 PARAM_EVT_FETCH_POST => 5 PARAM_EVT_NORMALIZE => 6 FETCH_LAZY => 1 FETCH_ASSOC => 2 FETCH_NUM => 3 FETCH_BOTH => 4 FETCH_OBJ => 5 FETCH_BOUND => 6 FETCH_COLUMN => 7 FETCH_CLASS => 8 FETCH_INTO => 9 FETCH_FUNC => 10 FETCH_GROUP => 65536 FETCH_UNIQUE => 196608 FETCH_CLASSTYPE => 262144 FETCH_SERIALIZE => 524288 FETCH_NAMED => 11 ATTR_AUTOCOMMIT => 0 ATTR_PREFETCH => 1 ATTR_TIMEOUT => 2 ATTR_ERRMODE => 3 ATTR_SERVER_VERSION => 4 ATTR_CLIENT_VERSION => 5 ATTR_SERVER_INFO => 6 ATTR_CONNECTION_STATUS => 7 ATTR_CASE => 8 ATTR_CURSOR_NAME => 9 ATTR_CURSOR => 10 ATTR_ORACLE_NULLS => 11 ATTR_PERSISTENT => 12 ATTR_STATEMENT_CLASS => 13 ATTR_FETCH_TABLE_NAMES => 14 ATTR_FETCH_CATALOG_NAMES => 15 ATTR_DRIVER_NAME => 16 ATTR_STRINGIFY_FETCHES => 17 ATTR_MAX_COLUMN_LEN => 18 ATTR_EMULATE_PREPARES => 19 ERRMODE_SILENT => 0 ERRMODE_WARNING => 1 ERRMODE_EXCEPTION => 2 CASE_NATURAL => 0 CASE_LOWER => 2 CASE_UPPER => 1 NULL_NATURAL => 0 NULL_EMPTY_STRING => 1 NULL_TO_STRING => 2 ERR_NONE => 00000 FETCH_ORI_NEXT => 0 FETCH_ORI_PRIOR => 1 FETCH_ORI_FIRST => 2 FETCH_ORI_LAST => 3 FETCH_ORI_ABS => 4 FETCH_ORI_REL => 5 CURSOR_FWDONLY => 0 CURSOR_SCROLL => 1
Output for 5.1.3
PARAM_BOOL => 5 PARAM_NULL => 0 PARAM_INT => 1 PARAM_STR => 2 PARAM_LOB => 3 PARAM_STMT => 4 PARAM_INPUT_OUTPUT => 2147483648 FETCH_LAZY => 1 FETCH_ASSOC => 2 FETCH_NUM => 3 FETCH_BOTH => 4 FETCH_OBJ => 5 FETCH_BOUND => 6 FETCH_COLUMN => 7 FETCH_CLASS => 8 FETCH_INTO => 9 FETCH_FUNC => 10 FETCH_GROUP => 65536 FETCH_UNIQUE => 196608 FETCH_CLASSTYPE => 262144 FETCH_SERIALIZE => 524288 FETCH_NAMED => 11 ATTR_AUTOCOMMIT => 0 ATTR_PREFETCH => 1 ATTR_TIMEOUT => 2 ATTR_ERRMODE => 3 ATTR_SERVER_VERSION => 4 ATTR_CLIENT_VERSION => 5 ATTR_SERVER_INFO => 6 ATTR_CONNECTION_STATUS => 7 ATTR_CASE => 8 ATTR_CURSOR_NAME => 9 ATTR_CURSOR => 10 ATTR_ORACLE_NULLS => 11 ATTR_PERSISTENT => 12 ATTR_STATEMENT_CLASS => 13 ATTR_FETCH_TABLE_NAMES => 14 ATTR_FETCH_CATALOG_NAMES => 15 ATTR_DRIVER_NAME => 16 ATTR_STRINGIFY_FETCHES => 17 ATTR_MAX_COLUMN_LEN => 18 ATTR_EMULATE_PREPARES => 19 ERRMODE_SILENT => 0 ERRMODE_WARNING => 1 ERRMODE_EXCEPTION => 2 CASE_NATURAL => 0 CASE_LOWER => 2 CASE_UPPER => 1 NULL_NATURAL => 0 NULL_EMPTY_STRING => 1 NULL_TO_STRING => 2 ERR_NONE => 00000 FETCH_ORI_NEXT => 0 FETCH_ORI_PRIOR => 1 FETCH_ORI_FIRST => 2 FETCH_ORI_LAST => 3 FETCH_ORI_ABS => 4 FETCH_ORI_REL => 5 CURSOR_FWDONLY => 0 CURSOR_SCROLL => 1
Output for 5.1.0 - 5.1.2
PARAM_BOOL => 5 PARAM_NULL => 0 PARAM_INT => 1 PARAM_STR => 2 PARAM_LOB => 3 PARAM_STMT => 4 PARAM_INPUT_OUTPUT => 2147483648 FETCH_LAZY => 1 FETCH_ASSOC => 2 FETCH_NUM => 3 FETCH_BOTH => 4 FETCH_OBJ => 5 FETCH_BOUND => 6 FETCH_COLUMN => 7 FETCH_CLASS => 8 FETCH_INTO => 9 FETCH_FUNC => 10 FETCH_GROUP => 65536 FETCH_UNIQUE => 196608 FETCH_CLASSTYPE => 262144 FETCH_SERIALIZE => 524288 FETCH_NAMED => 11 ATTR_AUTOCOMMIT => 0 ATTR_PREFETCH => 1 ATTR_TIMEOUT => 2 ATTR_ERRMODE => 3 ATTR_SERVER_VERSION => 4 ATTR_CLIENT_VERSION => 5 ATTR_SERVER_INFO => 6 ATTR_CONNECTION_STATUS => 7 ATTR_CASE => 8 ATTR_CURSOR_NAME => 9 ATTR_CURSOR => 10 ATTR_ORACLE_NULLS => 11 ATTR_PERSISTENT => 12 ATTR_STATEMENT_CLASS => 13 ATTR_FETCH_TABLE_NAMES => 14 ATTR_FETCH_CATALOG_NAMES => 15 ATTR_DRIVER_NAME => 16 ATTR_STRINGIFY_FETCHES => 17 ATTR_MAX_COLUMN_LEN => 18 ERRMODE_SILENT => 0 ERRMODE_WARNING => 1 ERRMODE_EXCEPTION => 2 CASE_NATURAL => 0 CASE_LOWER => 2 CASE_UPPER => 1 NULL_NATURAL => 0 NULL_EMPTY_STRING => 1 NULL_TO_STRING => 2 ERR_NONE => 00000 FETCH_ORI_NEXT => 0 FETCH_ORI_PRIOR => 1 FETCH_ORI_FIRST => 2 FETCH_ORI_LAST => 3 FETCH_ORI_ABS => 4 FETCH_ORI_REL => 5 CURSOR_FWDONLY => 0 CURSOR_SCROLL => 1
Output for 5.0.3 - 5.0.5
Fatal error: Uncaught exception 'ReflectionException' with message 'Class PDO does not exist' in /in/fhoaM:2 Stack trace: #0 /in/fhoaM(2): ReflectionClass->__construct('PDO') #1 {main} thrown in /in/fhoaM on line 2
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Fatal error: Uncaught exception 'ReflectionException' with message 'Class PDO does not exist' in /in/fhoaM:2 Stack trace: #0 {main} thrown in /in/fhoaM on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: reflectionclass in /in/fhoaM on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: reflectionclass in /in/fhoaM on line 2