3v4l.org

run code in 200+ PHP versions simultaneously
<?php $source = <<<EOD <?php include_once "noentry.php"; list(\$get_arr, \$post_arr, \$request_arr) = get_secure_request_params(); \$mode = empty(\$get_arr['mode']) ? 'add' : \$get_arr['mode']; try { if (!in_array(strtolower(\$mode), ['add', 'update'])) { throw new Exception("Error Processing Request", 0); } \$msg = trim(\$get_arr['var_msg']); if (strtolower(\$mode) == 'update') { \$top_header="Update ".'$module_header'; \$id = \$get_arr['$table_primary_key']; \$db_data = \$mfa_db_obj->db->table('$table_name')->select('*')->where('$table_primary_key', \$id)->first(); if(empty(\$db_data)) { \$redirect_url=\$admin_url."index.php?file=sitemap&AX=No"; header("Location:".\$redirect_url); } } } catch (Exception \$e) { \$exception_message=\$e->getMessage(); \$redirect_url=\$admin_url . "{$listing_url}&var_msg=".\$exception_message; header("Location:".\$redirect_url); exit; } include_once "common_css.php"; include_once "common_js.php"; ?> EOD; $tokens = token_get_all($source); foreach ($tokens as $token) { list($id, $text) = get_token($token); $lower_text = strtolower($text); if (T_STRING == $id && isset($alias_list[$lower_text])) { $alias_count[$lower_text] ++; } $return .= $text; } function get_token($token) { if (is_string($token)) { return array($token, $token); } else { return $token; } } echo $return;
based on OaBg4
Output for 7.0.0 - 7.4.0rc2
Notice: Undefined variable: module_header in /in/IHp8p on line 14 Notice: Undefined variable: table_primary_key in /in/IHp8p on line 15 Notice: Undefined variable: table_name in /in/IHp8p on line 16 Notice: Undefined variable: table_primary_key in /in/IHp8p on line 16 Notice: Undefined variable: listing_url in /in/IHp8p on line 25 Notice: Undefined variable: return in /in/IHp8p on line 40 <?php include_once "noentry.php"; list($get_arr, $post_arr, $request_arr) = get_secure_request_params(); $mode = empty($get_arr['mode']) ? 'add' : $get_arr['mode']; try { if (!in_array(strtolower($mode), ['add', 'update'])) { throw new Exception("Error Processing Request", 0); } $msg = trim($get_arr['var_msg']); if (strtolower($mode) == 'update') { $top_header="Update ".''; $id = $get_arr['']; $db_data = $mfa_db_obj->db->table('')->select('*')->where('', $id)->first(); if(empty($db_data)) { $redirect_url=$admin_url."index.php?file=sitemap&AX=No"; header("Location:".$redirect_url); } } } catch (Exception $e) { $exception_message=$e->getMessage(); $redirect_url=$admin_url . "&var_msg=".$exception_message; header("Location:".$redirect_url); exit; } include_once "common_css.php"; include_once "common_js.php"; ?>
Output for 5.2.3 - 5.6.40
Notice: Undefined variable: module_header in /in/IHp8p on line 15 Notice: Undefined variable: table_primary_key in /in/IHp8p on line 16 Notice: Undefined variable: table_name in /in/IHp8p on line 16 Notice: Undefined variable: table_primary_key in /in/IHp8p on line 25 Notice: Undefined variable: listing_url in /in/IHp8p on line 25 Notice: Undefined variable: return in /in/IHp8p on line 40 <?php include_once "noentry.php"; list($get_arr, $post_arr, $request_arr) = get_secure_request_params(); $mode = empty($get_arr['mode']) ? 'add' : $get_arr['mode']; try { if (!in_array(strtolower($mode), ['add', 'update'])) { throw new Exception("Error Processing Request", 0); } $msg = trim($get_arr['var_msg']); if (strtolower($mode) == 'update') { $top_header="Update ".''; $id = $get_arr['']; $db_data = $mfa_db_obj->db->table('')->select('*')->where('', $id)->first(); if(empty($db_data)) { $redirect_url=$admin_url."index.php?file=sitemap&AX=No"; header("Location:".$redirect_url); } } } catch (Exception $e) { $exception_message=$e->getMessage(); $redirect_url=$admin_url . "&var_msg=".$exception_message; header("Location:".$redirect_url); exit; } include_once "common_css.php"; include_once "common_js.php"; ?>
Output for 5.0.4 - 5.1.1, 5.1.3 - 5.2.2
Notice: Undefined variable: module_header in /in/IHp8p on line 15 Notice: Undefined variable: table_primary_key in /in/IHp8p on line 15 Notice: Undefined variable: table_name in /in/IHp8p on line 16 Notice: Undefined variable: table_primary_key in /in/IHp8p on line 16 Notice: Undefined variable: listing_url in /in/IHp8p on line 25 Notice: Undefined variable: return in /in/IHp8p on line 40 <?php include_once "noentry.php"; list($get_arr, $post_arr, $request_arr) = get_secure_request_params(); $mode = empty($get_arr['mode']) ? 'add' : $get_arr['mode']; try { if (!in_array(strtolower($mode), ['add', 'update'])) { throw new Exception("Error Processing Request", 0); } $msg = trim($get_arr['var_msg']); if (strtolower($mode) == 'update') { $top_header="Update ".''; $id = $get_arr['']; $db_data = $mfa_db_obj->db->table('')->select('*')->where('', $id)->first(); if(empty($db_data)) { $redirect_url=$admin_url."index.php?file=sitemap&AX=No"; header("Location:".$redirect_url); } } } catch (Exception $e) { $exception_message=$e->getMessage(); $redirect_url=$admin_url . "&var_msg=".$exception_message; header("Location:".$redirect_url); exit; } include_once "common_css.php"; include_once "common_js.php"; ?>
Output for 5.1.2
Notice: Undefined variable: module_header in /in/IHp8p on line 15 Notice: Undefined variable: table_primary_key in /in/IHp8p on line 15 Notice: Undefined variable: table_name in /in/IHp8p on line 16 Notice: Undefined variable: table_primary_key in /in/IHp8p on line 16 Notice: Undefined variable: listing_url in /in/IHp8p on line 25 Notice: Undefined variable: return in /in/IHp8p on line 41 <?php include_once "noentry.php"; list($get_arr, $post_arr, $request_arr) = get_secure_request_params(); $mode = empty($get_arr['mode']) ? 'add' : $get_arr['mode']; try { if (!in_array(strtolower($mode), ['add', 'update'])) { throw new Exception("Error Processing Request", 0); } $msg = trim($get_arr['var_msg']); if (strtolower($mode) == 'update') { $top_header="Update ".''; $id = $get_arr['']; $db_data = $mfa_db_obj->db->table('')->select('*')->where('', $id)->first(); if(empty($db_data)) { $redirect_url=$admin_url."index.php?file=sitemap&AX=No"; header("Location:".$redirect_url); } } } catch (Exception $e) { $exception_message=$e->getMessage(); $redirect_url=$admin_url . "&var_msg=".$exception_message; header("Location:".$redirect_url); exit; } include_once "common_css.php"; include_once "common_js.php"; ?>
Output for 4.3.0 - 4.4.1, 4.4.3 - 5.0.3
Notice: Undefined variable: module_header in /in/IHp8p on line 15 Notice: Undefined variable: table_primary_key in /in/IHp8p on line 15 Notice: Undefined variable: table_name in /in/IHp8p on line 16 Notice: Undefined variable: table_primary_key in /in/IHp8p on line 16 Notice: Undefined variable: listing_url in /in/IHp8p on line 25 Notice: Undefined variable: return in /in/IHp8p on line 40 <?php include_once "noentry.php"; list($get_arr, $post_arr, $request_arr) = get_secure_request_params(); $mode = empty($get_arr['mode']) ? 'add' : $get_arr['mode']; try { if (!in_array(strtolower($mode), ['add', 'update'])) { throw new Exception("Error Processing Request", 0); } $msg = trim($get_arr['var_msg']); if (strtolower($mode) == 'update') { $top_header="Update ".''; $id = $get_arr['']; $db_data = $mfa_db_obj->db->table('')->select('*')->where('', $id)->first(); if(empty($db_data)) { $redirect_url=$admin_url."index.php?file=sitemap&AX=No"; header("Location:".$redirect_url); } } } catch (Exception $e) { $exception_message=$e->getMessage(); $redirect_url=$admin_url . "&var_msg=".$exception_message; header("Location:".$redirect_url); exit; } include_once "common_css.php"; include_once "common_js.php"; ?>
Output for 4.4.2
Notice: Undefined variable: module_header in /in/IHp8p on line 15 Notice: Undefined variable: table_primary_key in /in/IHp8p on line 15 Notice: Undefined variable: table_name in /in/IHp8p on line 16 Notice: Undefined variable: table_primary_key in /in/IHp8p on line 16 Notice: Undefined variable: listing_url in /in/IHp8p on line 25 Notice: Undefined variable: return in /in/IHp8p on line 41 <?php include_once "noentry.php"; list($get_arr, $post_arr, $request_arr) = get_secure_request_params(); $mode = empty($get_arr['mode']) ? 'add' : $get_arr['mode']; try { if (!in_array(strtolower($mode), ['add', 'update'])) { throw new Exception("Error Processing Request", 0); } $msg = trim($get_arr['var_msg']); if (strtolower($mode) == 'update') { $top_header="Update ".''; $id = $get_arr['']; $db_data = $mfa_db_obj->db->table('')->select('*')->where('', $id)->first(); if(empty($db_data)) { $redirect_url=$admin_url."index.php?file=sitemap&AX=No"; header("Location:".$redirect_url); } } } catch (Exception $e) { $exception_message=$e->getMessage(); $redirect_url=$admin_url . "&var_msg=".$exception_message; header("Location:".$redirect_url); exit; } include_once "common_css.php"; include_once "common_js.php"; ?>