3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "<?php\n\n"; foreach (['e', 'f', 'n', 'r', 't', 'v'] as $c) { echo "define('\\\\{$c}', \"\\{$c}\");\n"; } for ($i = 0; $i < 256; $i++) { $str = str_pad(strtoupper(dechex($i)), 2, '0', STR_PAD_LEFT); $p1 = [$str[0]]; if ($str[0] >= 'A' && $str[0] <= 'F') { $p1[] = strtolower($str[0]); } $p2 = [$str[1]]; if ($str[1] >= 'A' && $str[1] <= 'F') { $p2[] = strtolower($str[1]); } foreach ($p1 as $c1) foreach ($p2 as $c2) echo "define('\\\\x{$c1}{$c2}', \"\\x{$str}\");\n"; }

Abusive script

This script was stopped while abusing our resources

Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.21, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.29, 8.2.0 - 8.2.23, 8.3.0 - 8.3.11
<?php define('\\e', "\e"); define('\\f', "\f"); define('\\n', "\n"); define('\\r', "\r"); define('\\t', "\t"); define('\\v', "\v"); define('\\x00', "\x00"); define('\\x01', "\x01"); define('\\x02', "\x02"); define('\\x03', "\x03"); define('\\x04', "\x04"); define('\\x05', "\x05"); define('\\x06', "\x06"); define('\\x07', "\x07"); define('\\x08', "\x08"); define('\\x09', "\x09"); define('\\x0A', "\x0A"); define('\\x0a', "\x0A"); define('\\x0B', "\x0B"); define('\\x0b', "\x0B"); define('\\x0C', "\x0C"); define('\\x0c', "\x0C"); define('\\x0D', "\x0D"); define('\\x0d', "\x0D"); define('\\x0E', "\x0E"); define('\\x0e', "\x0E"); define('\\x0F', "\x0F"); define('\\x0f', "\x0F"); define('\\x10', "\x10"); define('\\x11', "\x11"); define('\\x12', "\x12"); define('\\x13', "\x13"); define('\\x14', "\x14"); define('\\x15', "\x15"); define('\\x16', "\x16"); define('\\x17', "\x17"); define('\\x18', "\x18"); define('\\x19', "\x19"); define('\\x1A', "\x1A"); define('\\x1a', "\x1A"); define('\\x1B', "\x1B"); define('\\x1b', "\x1B"); define('\\x1C', "\x1C"); define('\\x1c', "\x1C"); define('\\x1D', "\x1D"); define('\\x1d', "\x1D"); define('\\x1E', "\x1E"); define('\\x1e', "\x1E"); define('\\x1F', "\x1F"); define('\\x1f', "\x1F"); define('\\x20', "\x20"); define('\\x21', "\x21"); define('\\x22', "\x22"); define('\\x23', "\x23"); define('\\x24', "\x24"); define('\\x25', "\x25"); define('\\x26', "\x26"); define('\\x27', "\x27"); define('\\x28', "\x28"); define('\\x29', "\x29"); define('\\x2A', "\x2A"); define('\\x2a', "\x2A"); define('\\x2B', "\x2B"); define('\\x2b', "\x2B"); define('\\x2C', "\x2C"); define('\\x2c', "\x2C"); define('\\x2D', "\x2D"); define('\\x2d', "\x2D"); define('\\x2E', "\x2E"); define('\\x2e', "\x2E"); define('\\x2F', "\x2F"); define('\\x2f', "\x2F"); define('\\x30', "\x30"); define('\\x31', "\x31"); define('\\x32', "\x32"); define('\\x33', "\x33"); define('\\x34', "\x34"); define('\\x35', "\x35"); define('\\x36', "\x36"); define('\\x37', "\x37"); define('\\x38', "\x38"); define('\\x39', "\x39"); define('\\x3A', "\x3A"); define('\\x3a', "\x3A"); define('\\x3B', "\x3B"); define('\\x3b', "\x3B"); define('\\x3C', "\x3C"); define('\\x3c', "\x3C"); define('\\x3D', "\x3D"); define('\\x3d', "\x3D"); define('\\x3E', "\x3E"); define('\\x3e', "\x3E"); define('\\x3F', "\x3F"); define('\\x3f', "\x3F"); define('\\x40', "\x40"); define('\\x41', "\x41"); define('\\x42', "\x42"); define('\\x43', "\x43"); define('\\x44', "\x44"); define('\\x45', "\x45"); define('\\x46', "\x46"); define('\\x47', "\x47"); define('\\x48', "\x48"); define('\\x49', "\x49"); define('\\x4A', "\x4A"); define('\\x4a', "\x4A"); define('\\x4B', "\x4B"); define('\\x4b', "\x4B"); define('\\x4C', "\x4C"); define('\\x4c', "\x4C"); define('\\x4D', "\x4D"); define('\\x4d', "\x4D"); define('\\x4E', "\x4E"); define('\\x4e', "\x4E"); define('\\x4F', "\x4F"); define('\\x4f', "\x4F"); define('\\x50', "\x50"); define('\\x51', "\x51"); define('\\x52', "\x52"); define('\\x53', "\x53"); define('\\x54', "\x54"); define('\\x55', "\x55"); define('\\x56', "\x56"); define('\\x57', "\x57"); define('\\x58', "\x58"); define('\\x59', "\x59"); define('\\x5A', "\x5A"); define('\\x5a', "\x5A"); define('\\x5B', "\x5B"); define('\\x5b', "\x5B"); define('\\x5C', "\x5C"); define('\\x5c', "\x5C"); define('\\x5D', "\x5D"); define('\\x5d', "\x5D"); define('\\x5E', "\x5E"); define('\\x5e', "\x5E"); define('\\x5F', "\x5F"); define('\\x5f', "\x5F"); define('\\x60', "\x60"); define('\\x61', "\x61"); define('\\x62', "\x62"); define('\\x63', "\x63"); define('\\x64', "\x64"); define('\\x65', "\x65"); define('\\x66', "\x66"); define('\\x67', "\x67"); define('\\x68', "\x68"); define('\\x69', "\x69"); define('\\x6A', "\x6A"); define('\\x6a', "\x6A"); define('\\x6B', "\x6B"); define('\\x6b', "\x6B"); define('\\x6C', "\x6C"); define('\\x6c', "\x6C"); define('\\x6D', "\x6D"); define('\\x6d', "\x6D"); define('\\x6E', "\x6E"); define('\\x6e', "\x6E"); define('\\x6F', "\x6F"); define('\\x6f', "\x6F"); define('\\x70', "\x70"); define('\\x71', "\x71"); define('\\x72', "\x72"); define('\\x73', "\x73"); define('\\x74', "\x74"); define('\\x75', "\x75"); define('\\x76', "\x76"); define('\\x77', "\x77"); define('\\x78', "\x78"); define('\\x79', "\x79"); define('\\x7A', "\x7A"); define('\\x7a', "\x7A"); define('\\x7B', "\x7B"); define('\\x7b', "\x7B"); define('\\x7C', "\x7C"); define('\\x7c', "\x7C"); define('\\x7D', "\x7D"); define('\\x7d', "\x7D"); define('\\x7E', "\x7E"); define('\\x7e', "\x7E"); define('\\x7F', "\x7F"); define('\\x7f', "\x7F"); define('\\x80', "\x80"); define('\\x81', "\x81"); define('\\x82', "\x82"); define('\\x83', "\x83"); define('\\x84', "\x84"); define('\\x85', "\x85"); define('\\x86', "\x86"); define('\\x87', "\x87"); define('\\x88', "\x88"); define('\\x89', "\x89"); define('\\x8A', "\x8A"); define('\\x8a', "\x8A"); define('\\x8B', "\x8B"); define('\\x8b', "\x8B"); define('\\x8C', "\x8C"); define('\\x8c', "\x8C"); define('\\x8D', "\x8D"); define('\\x8d', "\x8D"); define('\\x8E', "\x8E"); define('\\x8e', "\x8E"); define('\\x8F', "\x8F"); define('\\x8f', "\x8F"); define('\\x90', "\x90"); define('\\x91', "\x91"); define('\\x92', "\x92"); define('\\x93', "\x93"); define('\\x94', "\x94"); define('\\x95', "\x95"); define('\\x96', "\x96"); define('\\x97', "\x97"); define('\\x98', "\x98"); define('\\x99', "\x99"); define('\\x9A', "\x9A"); define('\\x9a', "\x9A"); define('\\x9B', "\x9B"); define('\\x9b', "\x9B"); define('\\x9C', "\x9C"); define('\\x9c', "\x9C"); define('\\x9D', "\x9D"); define('\\x9d', "\x9D"); define('\\x9E', "\x9E"); define('\\x9e', "\x9E"); define('\\x9F', "\x9F"); define('\\x9f', "\x9F"); define('\\xA0', "\xA0"); define('\\xa0', "\xA0"); define('\\xA1', "\xA1"); define('\\xa1', "\xA1"); define('\\xA2', "\xA2"); define('\\xa2', "\xA2"); define('\\xA3', "\xA3"); define('\\xa3', "\xA3"); define('\\xA4', "\xA4"); define('\\xa4', "\xA4"); define('\\xA5', "\xA5"); define('\\xa5', "\xA5"); define('\\xA6', "\xA6"); define('\\xa6', "\xA6"); define('\\xA7', "\xA7"); define('\\xa7', "\xA7"); define('\\xA8', "\xA8"); define('\\xa8', "\xA8"); define('\\xA9', "\xA9"); define('\\xa9', "\xA9"); define('\\xAA', "\xAA"); define('\\xAa', "\xAA"); define('\\xaA', "\xAA"); define('\\xaa', "\xAA"); define('\\xAB', "\xAB"); define('\\xAb', "\xAB"); define('\\xaB', "\xAB"); define('\\xab', "\xAB"); define('\\xAC', "\xAC"); define('\\xAc', "\xAC"); define('\\xaC', "\xAC"); define('\\xac', "\xAC"); define('\\xAD', "\xAD"); define('\\xAd', "\xAD"); define('\\xaD', "\xAD"); define('\\xad', "\xAD"); define('\\xAE', "\xAE"); define('\\xAe', "\xAE"); define('\\xaE', "\xAE"); define('\\xae', "\xAE"); define('\\xAF', "\xAF"); define('\\xAf', "\xAF"); define('\\xaF', "\xAF"); define('\\xaf', "\xAF"); define('\\xB0', "\xB0"); define('\\xb0', "\xB0"); define('\\xB1', "\xB1"); define('\\xb1', "\xB1"); define('\\xB2', "\xB2"); define('\\xb2', "\xB2"); define('\\xB3', "\xB3"); define('\\xb3', "\xB3"); define('\\xB4', "\xB4"); define('\\xb4', "\xB4"); define('\\xB5', "\xB5"); define('\\xb5', "\xB5"); define('\\xB6', "\xB6"); define('\\xb6', "\xB6"); define('\\xB7', "\xB7"); define('\\xb7', "\xB7"); define('\\xB8', "\xB8"); define('\\xb8', "\xB8"); define('\\xB9', "\xB9"); define('\\xb9', "\xB9"); define('\\xBA', "\xBA"); define('\\xBa', "\xBA"); define('\\xbA', "\xBA"); define('\\xba', "\xBA"); define('\\xBB', "\xBB"); define('\\xBb', "\xBB"); define('\\xbB', "\xBB"); define('\\xbb', "\xBB"); define('\\xBC', "\xBC"); define('\\xBc', "\xBC"); define('\\xbC', "\xBC"); define('\\xbc', "\xBC"); define('\\xBD', "\xBD"); define('\\xBd', "\xBD"); define('\\xbD', "\xBD"); define('\\xbd', "\xBD"); define('\\xBE', "\xBE"); define('\\xBe', "\xBE"); define('\\xbE', "\xBE"); define('\\xbe', "\xBE"); define('\\xBF', "\xBF"); define('\\xBf', "\xBF"); define('\\xbF', "\xBF"); define('\\xbf', "\xBF"); define('\\xC0', "\xC0"); define('\\xc0', "\xC0"); define('\\xC1', "\xC1"); define('\\xc1', "\xC1"); define('\\xC2', "\xC2"); define('\\xc2', "\xC2"); define('\\xC3', "\xC3"); define('\\xc3', "\xC3"); define('\\xC4', "\xC4"); define('\\xc4', "\xC4"); define('\\xC5', "\xC5"); define('\\xc5', "\xC5"); define('\\xC6', "\xC6"); define('\\xc6', "\xC6"); define('\\xC7', "\xC7"); define('\\xc7', "\xC7"); define('\\xC8', "\xC8"); define('\\xc8', "\xC8"); define('\\xC9', "\xC9"); define('\\xc9', "\xC9"); define('\\xCA', "\xCA"); define('\\xCa', "\xCA"); define('\\xcA', "\xCA"); define('\\xca', "\xCA"); define('\\xCB', "\xCB"); define('\\xCb', "\xCB"); define('\\xcB', "\xCB"); define('\\xcb', "\xCB"); define('\\xCC', "\xCC"); define('\\xCc', "\xCC"); define('\\xcC', "\xCC"); define('\\xcc', "\xCC"); define('\\xCD', "\xCD"); define('\\xCd', "\xCD"); define('\\xcD', "\xCD"); define('\\xcd', "\xCD"); define('\\xCE', "\xCE"); define('\\xCe', "\xCE"); define('\\xcE', "\xCE"); define('\\xce', "\xCE"); define('\\xCF', "\xCF"); define('\\xCf', "\xCF"); define('\\xcF', "\xCF"); define('\\xcf', "\xCF"); define('\\xD0', "\xD0"); define('\\xd0', "\xD0"); define('\\xD1', "\xD1"); define('\\xd1', "\xD1"); define('\\xD2', "\xD2"); define('\\xd2', "\xD2"); define('\\xD3', "\xD3"); define('\\xd3', "\xD3"); define('\\xD4', "\xD4"); define('\\xd4', "\xD4"); define('\\xD5', "\xD5"); define('\\xd5', "\xD5"); define('\\xD6', "\xD6"); define('\\xd6', "\xD6"); define('\\xD7', "\xD7"); define('\\xd7', "\xD7"); define('\\xD8', "\xD8"); define('\\xd8', "\xD8"); define('\\xD9', "\xD9"); define('\\xd9', "\xD9"); define('\\xDA', "\xDA"); define('\\xDa', "\xDA"); define('\\xdA', "\xDA"); define('\\xda', "\xDA"); define('\\xDB', "\xDB"); define('\\xDb', "\xDB"); define('\\xdB', "\xDB"); define('\\xdb', "\xDB"); define('\\xDC', "\xDC"); define('\\xDc', "\xDC"); define('\\xdC', "\xDC"); define('\\xdc', "\xDC"); define('\\xDD', "\xDD"); define('\\xDd', "\xDD"); define('\\xdD', "\xDD"); define('\\xdd', "\xDD"); define('\\xDE', "\xDE"); define('\\xDe', "\xDE"); define('\\xdE', "\xDE"); define('\\xde', "\xDE"); define('\\xDF', "\xDF"); define('\\xDf', "\xDF"); define('\\xdF', "\xDF"); define('\\xdf', "\xDF"); define('\\xE0', "\xE0"); define('\\xe0', "\xE0"); define('\\xE1', "\xE1"); define('\\xe1', "\xE1"); define('\\xE2', "\xE2"); define('\\xe2', "\xE2"); define('\\xE3', "\xE3"); define('\\xe3', "\xE3"); define('\\xE4', "\xE4"); define('\\xe4', "\xE4"); define('\\xE5', "\xE5"); define('\\xe5', "\xE5"); define('\\xE6', "\xE6"); define('\\xe6', "\xE6"); define('\\xE7', "\xE7"); define('\\xe7', "\xE7"); define('\\xE8', "\xE8"); define('\\xe8', "\xE8"); define('\\xE9', "\xE9"); define('\\xe9', "\xE9"); define('\\xEA', "\xEA"); define('\\xEa', "\xEA"); define('\\xeA', "\xEA"); define('\\xea', "\xEA"); define('\\xEB', "\xEB"); define('\\xEb', "\xEB"); define('\\xeB', "\xEB"); define('\\xeb', "\xEB"); define('\\xEC', "\xEC"); define('\\xEc', "\xEC"); define('\\xeC', "\xEC"); define('\\xec', "\xEC"); define('\\xED', "\xED"); define('\\xEd', "\xED"); define('\\xeD', "\xED"); define('\\xed', "\xED"); define('\\xEE', "\xEE"); define('\\xEe', "\xEE"); define('\\xeE', "\xEE"); define('\\xee', "\xEE"); define('\\xEF', "\xEF"); define('\\xEf', "\xEF"); define('\\xeF', "\xEF"); define('\\xef', "\xEF"); define('\\xF0', "\xF0"); define('\\xf0', "\xF0"); define('\\xF1', "\xF1"); define('\\xf1', "\xF1"); define('\\xF2', "\xF2"); define('\\xf2', "\xF2"); define('\\xF3', "\xF3"); define('\\xf3', "\xF3"); define('\\xF4', "\xF4"); define('\\xf4', "\xF4"); define('\\xF5', "\xF5"); define('\\xf5', "\xF5"); define('\\xF6', "\xF6"); define('\\xf6', "\xF6"); define('\\xF7', "\xF7"); define('\\xf7', "\xF7"); define('\\xF8', "\xF8"); define('\\xf8', "\xF8"); define('\\xF9', "\xF9"); define('\\xf9', "\xF9"); define('\\xFA', "\xFA"); define('\\xFa', "\xFA"); define('\\xfA', "\xFA"); define('\\xfa', "\xFA"); define('\\xFB', "\xFB"); define('\\xFb', "\xFB"); define('\\xfB', "\xFB"); define('\\xfb', "\xFB"); define('\\xFC', "\xFC"); define('\\xFc', "\xFC"); define('\\xfC', "\xFC"); define('\\xfc', "\xFC"); define('\\xFD', "\xFD"); define('\\xFd', "\xFD"); define('\\xfD', "\xFD"); define('\\xfd', "\xFD"); define('\\xFE', "\xFE"); define('\\xFe', "\xFE"); define('\\xfE', "\xFE"); define('\\xfe', "\xFE"); define('\\xFF', "\xFF"); define('\\xFf', "\xFF"); define('\\xfF', "\xFF"); define('\\xff', "\xFF");
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/jv844 on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/jv844 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/jv844 on line 5
Process exited with code 255.

preferences:
103.72 ms | 421 KiB | 5 Q