3v4l.org

run code in 300+ PHP versions simultaneously
<?php $default = array( // physical path of YOURLS root 'ABSPATH' => str_replace( '\\', '/', __DIR__ ), // physical path of includes directory 'INC' => array( 'ABSPATH', '/includes' ), // physical path and url of asset directory 'ASSET_DIR' => array( 'ABSPATH', '/assets' ), 'ASSET_URL' => array( 'SITE', '/assets' ), // physical path and url of user directory 'USER_DIR' => array( 'ABSPATH', '/user' ), 'USER_URL' => array( 'SITE', '/user' ), // physical path of translations directory 'LANG_DIR' => array( 'USER_DIR', '/languages' ), // physical path and url of plugins directory 'PLUGIN_DIR' => array( 'USER_DIR', '/plugins' ), 'PLUGIN_URL' => array( 'USER_URL', '/plugins' ), // physical path and url of themes directory 'THEME_DIR' => array( 'USER_DIR', '/themes' ), 'THEME_URL' => array( 'USER_URL', '/themes' ), // physical path of pages directory 'PAGE_DIR' => array( 'USER_DIR', '/pages' ), // admin pages location 'ADMIN_LOCATION' => 'admin', // table to store URLs 'DB_TABLE_URL' => array( 'DB_PREFIX', 'url' ), // table to store options 'DB_TABLE_OPTIONS' => array( 'DB_PREFIX', 'options' ), // table to store hits, for stats 'DB_TABLE_LOG' => array( 'DB_PREFIX', 'log' ), // minimum delay in sec before a same IP can add another URL. Note: logged in users are not throttled down. 'FLOOD_DELAY_SECONDS' => 15, // comma separated list of IPs that can bypass flood check. 'FLOOD_IP_WHITELIST' => '', 'COOKIE_LIFE' => 60*60*24*7, // life span of a nonce in seconds 'NONCE_LIFE' => 43200, // 3600 *,12 // if set to true, disable stat logging (no use for it, too busy servers, ...) 'check_update' => false, // if set to true, force https:// in the admin area 'ADMIN_SSL' => false, // if set to true, verbose debug infos. Will break things. Don't enable. 'DEBUG' => false, ); var_dump($default);
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
array(23) { ["ABSPATH"]=> string(3) "/in" ["INC"]=> array(2) { [0]=> string(7) "ABSPATH" [1]=> string(9) "/includes" } ["ASSET_DIR"]=> array(2) { [0]=> string(7) "ABSPATH" [1]=> string(7) "/assets" } ["ASSET_URL"]=> array(2) { [0]=> string(4) "SITE" [1]=> string(7) "/assets" } ["USER_DIR"]=> array(2) { [0]=> string(7) "ABSPATH" [1]=> string(5) "/user" } ["USER_URL"]=> array(2) { [0]=> string(4) "SITE" [1]=> string(5) "/user" } ["LANG_DIR"]=> array(2) { [0]=> string(8) "USER_DIR" [1]=> string(10) "/languages" } ["PLUGIN_DIR"]=> array(2) { [0]=> string(8) "USER_DIR" [1]=> string(8) "/plugins" } ["PLUGIN_URL"]=> array(2) { [0]=> string(8) "USER_URL" [1]=> string(8) "/plugins" } ["THEME_DIR"]=> array(2) { [0]=> string(8) "USER_DIR" [1]=> string(7) "/themes" } ["THEME_URL"]=> array(2) { [0]=> string(8) "USER_URL" [1]=> string(7) "/themes" } ["PAGE_DIR"]=> array(2) { [0]=> string(8) "USER_DIR" [1]=> string(6) "/pages" } ["ADMIN_LOCATION"]=> string(5) "admin" ["DB_TABLE_URL"]=> array(2) { [0]=> string(9) "DB_PREFIX" [1]=> string(3) "url" } ["DB_TABLE_OPTIONS"]=> array(2) { [0]=> string(9) "DB_PREFIX" [1]=> string(7) "options" } ["DB_TABLE_LOG"]=> array(2) { [0]=> string(9) "DB_PREFIX" [1]=> string(3) "log" } ["FLOOD_DELAY_SECONDS"]=> int(15) ["FLOOD_IP_WHITELIST"]=> string(0) "" ["COOKIE_LIFE"]=> int(604800) ["NONCE_LIFE"]=> int(43200) ["check_update"]=> bool(false) ["ADMIN_SSL"]=> bool(false) ["DEBUG"]=> bool(false) }
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/IQEWT on line 5 array(23) { ["ABSPATH"]=> string(7) "__DIR__" ["INC"]=> array(2) { [0]=> string(7) "ABSPATH" [1]=> string(9) "/includes" } ["ASSET_DIR"]=> array(2) { [0]=> string(7) "ABSPATH" [1]=> string(7) "/assets" } ["ASSET_URL"]=> array(2) { [0]=> string(4) "SITE" [1]=> string(7) "/assets" } ["USER_DIR"]=> array(2) { [0]=> string(7) "ABSPATH" [1]=> string(5) "/user" } ["USER_URL"]=> array(2) { [0]=> string(4) "SITE" [1]=> string(5) "/user" } ["LANG_DIR"]=> array(2) { [0]=> string(8) "USER_DIR" [1]=> string(10) "/languages" } ["PLUGIN_DIR"]=> array(2) { [0]=> string(8) "USER_DIR" [1]=> string(8) "/plugins" } ["PLUGIN_URL"]=> array(2) { [0]=> string(8) "USER_URL" [1]=> string(8) "/plugins" } ["THEME_DIR"]=> array(2) { [0]=> string(8) "USER_DIR" [1]=> string(7) "/themes" } ["THEME_URL"]=> array(2) { [0]=> string(8) "USER_URL" [1]=> string(7) "/themes" } ["PAGE_DIR"]=> array(2) { [0]=> string(8) "USER_DIR" [1]=> string(6) "/pages" } ["ADMIN_LOCATION"]=> string(5) "admin" ["DB_TABLE_URL"]=> array(2) { [0]=> string(9) "DB_PREFIX" [1]=> string(3) "url" } ["DB_TABLE_OPTIONS"]=> array(2) { [0]=> string(9) "DB_PREFIX" [1]=> string(7) "options" } ["DB_TABLE_LOG"]=> array(2) { [0]=> string(9) "DB_PREFIX" [1]=> string(3) "log" } ["FLOOD_DELAY_SECONDS"]=> int(15) ["FLOOD_IP_WHITELIST"]=> string(0) "" ["COOKIE_LIFE"]=> int(604800) ["NONCE_LIFE"]=> int(43200) ["check_update"]=> bool(false) ["ADMIN_SSL"]=> bool(false) ["DEBUG"]=> bool(false) }

preferences:
310.47 ms | 406 KiB | 453 Q