3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/> <title>Contact us</title> <link rel="STYLESHEET" type="text/css" href="contact.css" /> <script type='text/javascript' src='scripts/gen_validatorv31.js'></script> <script type='text/javascript' src='scripts/fg_captcha_validator.js'></script> </head> <body> <!-- Form Code Start --> <form id='contactus' action='<?php echo $formproc->GetSelfScript(); ?>' method='post' onsubmit="return confirm('confirm submit?');" enctype="multipart/form-data" accept-charset='UTF-8'> <fieldset > <legend>Contact us</legend> <input type='hidden' name='submitted' id='submitted' value='1'/> <input type='hidden' name='<?php echo $formproc->GetFormIDInputName(); ?>' value='<?php echo $formproc->GetFormIDInputValue(); ?>'/> <input type='text' class='spmhidip' name='<?php echo $formproc->GetSpamTrapInputName(); ?>' /> <div class='short_explanation'>* required fields</div> <div><span class='error'><?php echo $formproc->GetErrorMessage(); ?></span></div> <div class='container'> <label for='name' >Your Full Name*: </label><br/> <input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name') ?>' maxlength="50" /><br/> <span id='contactus_name_errorloc' class='error'></span> </div> <div class='container'> <label for='email' >Email Address*:</label><br/> <input type='text' name='email' id='email' value='<?php echo $formproc->SafeDisplay('email') ?>' maxlength="50" /><br/> <span id='contactus_email_errorloc' class='error'></span> </div> <div class='container'> <label for='message' >Message:</label><br/> <span id='contactus_message_errorloc' class='error'></span> <textarea rows="10" cols="50" name='message' id='message'><?php echo $formproc->SafeDisplay('message') ?></textarea> </div> <div class='container'> <label for='photo' >Upload your photo:</label><br/> <input type="file" name='photo' id='photo' /><br/> <span id='contactus_photo_errorloc' class='error'></span> </div> <div class='container'> <input type='submit' name='Submit' value='Submit' /> </div> </fieldset> </form> <!-- client-side Form Validations: Uses the excellent form validation script from JavaScript-coder.com--> <script type='text/javascript'> // <![CDATA[ var frmvalidator = new Validator("contactus"); frmvalidator.EnableOnPageErrorDisplay(); frmvalidator.EnableMsgsTogether(); frmvalidator.addValidation("name","req","Please provide your name"); frmvalidator.addValidation("email","req","Please provide your email address"); frmvalidator.addValidation("email","email","Please provide a valid email address"); frmvalidator.addValidation("message","maxlen=2048","The message is too long!(more than 2KB!)"); frmvalidator.addValidation("photo","file_extn=jpg;jpeg;gif;png;bmp","Upload images only. Supported file types are: jpg,gif,png,bmp"); // ]]> </script> </body> </html>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/> <title>Contact us</title> <link rel="STYLESHEET" type="text/css" href="contact.css" /> <script type='text/javascript' src='scripts/gen_validatorv31.js'></script> <script type='text/javascript' src='scripts/fg_captcha_validator.js'></script> </head> <body> <!-- Form Code Start --> <form id='contactus' action=' Warning: Undefined variable $formproc in /in/WjiBb on line 13 Fatal error: Uncaught Error: Call to a member function GetSelfScript() on null in /in/WjiBb:13 Stack trace: #0 {main} thrown in /in/WjiBb on line 13
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/> <title>Contact us</title> <link rel="STYLESHEET" type="text/css" href="contact.css" /> <script type='text/javascript' src='scripts/gen_validatorv31.js'></script> <script type='text/javascript' src='scripts/fg_captcha_validator.js'></script> </head> <body> <!-- Form Code Start --> <form id='contactus' action=' Warning: Undefined variable $formproc in /in/WjiBb on line 13 Fatal error: Uncaught Error: Call to a member function GetSelfScript() on null in /in/WjiBb:13 Stack trace: #0 {main} thrown in /in/WjiBb on line 13
Process exited with code 255.
Output for 7.0.5 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/> <title>Contact us</title> <link rel="STYLESHEET" type="text/css" href="contact.css" /> <script type='text/javascript' src='scripts/gen_validatorv31.js'></script> <script type='text/javascript' src='scripts/fg_captcha_validator.js'></script> </head> <body> <!-- Form Code Start --> <form id='contactus' action=' Notice: Undefined variable: formproc in /in/WjiBb on line 13 Fatal error: Uncaught Error: Call to a member function GetSelfScript() on null in /in/WjiBb:13 Stack trace: #0 {main} thrown in /in/WjiBb on line 13
Process exited with code 255.
Output for 7.3.32 - 7.3.33
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/> <title>Contact us</title> <link rel="STYLESHEET" type="text/css" href="contact.css" /> <script type='text/javascript' src='scripts/gen_validatorv31.js'></script> <script type='text/javascript' src='scripts/fg_captcha_validator.js'></script> </head> <body> <!-- Form Code Start --> <form id='contactus' action=' Fatal error: Uncaught Error: Call to a member function GetSelfScript() on null in /in/WjiBb:13 Stack trace: #0 {main} thrown in /in/WjiBb on line 13
Process exited with code 255.
Output for 7.0.0 - 7.0.4
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/> <title>Contact us</title> <link rel="STYLESHEET" type="text/css" href="contact.css" /> <script type='text/javascript' src='scripts/gen_validatorv31.js'></script> <script type='text/javascript' src='scripts/fg_captcha_validator.js'></script> </head> <body> <!-- Form Code Start --> <form id='contactus' action=' Notice: Undefined variable: formproc in /in/WjiBb on line 13 Fatal error: Uncaught Error: Call to a member function GetSelfScript() on unknown in /in/WjiBb:13 Stack trace: #0 {main} thrown in /in/WjiBb on line 13
Process exited with code 255.
Output for 5.6.7 - 5.6.28
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/> <title>Contact us</title> <link rel="STYLESHEET" type="text/css" href="contact.css" /> <script type='text/javascript' src='scripts/gen_validatorv31.js'></script> <script type='text/javascript' src='scripts/fg_captcha_validator.js'></script> </head> <body> <!-- Form Code Start --> <form id='contactus' action=' Notice: Undefined variable: formproc in /in/WjiBb on line 13 Fatal error: Call to a member function GetSelfScript() on null in /in/WjiBb on line 13
Process exited with code 255.
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.35
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> <head> <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/> <title>Contact us</title> <link rel="STYLESHEET" type="text/css" href="contact.css" /> <script type='text/javascript' src='scripts/gen_validatorv31.js'></script> <script type='text/javascript' src='scripts/fg_captcha_validator.js'></script> </head> <body> <!-- Form Code Start --> <form id='contactus' action=' Notice: Undefined variable: formproc in /in/WjiBb on line 13 Fatal error: Call to a member function GetSelfScript() on a non-object in /in/WjiBb on line 13
Process exited with code 255.

preferences:
211.82 ms | 402 KiB | 226 Q