Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php class Form_helper_test extends CI_TestCase { public function set_up() { $this->help..

Decoded Output download

<?php
 class Form_helper_test extends CI_TestCase { public function set_up() { $this->helper("form"); } public function test_form_hidden() { $expected = "
<input type="hidden" name="username" value="johndoe" />\xa"; $this->assertEquals($expected, form_hidden("username", "johndoe")); } public function test_form_input() { $expected = "<input type="text" name="username" value="johndoe" id="username" maxlength="100" size="50" style="width:50%"  />\xa"; $data = array("name" => "username", "id" => "username", "value" => "johndoe", "maxlength" => "100", "size" => "50", "style" => "width:50%"); $this->assertEquals($expected, form_input($data)); } public function test_form_password() { $expected = "<input type="password" name="password" value=""  />\xa"; $this->assertEquals($expected, form_password("password")); } public function test_form_upload() { $expected = "<input type="file" name="attachment"  />
"; $this->assertEquals($expected, form_upload("attachment")); } public function test_form_textarea() { $expected = "<textarea name="notes" cols="40" rows="10" >Notes</textarea>
"; $this->assertEquals($expected, form_textarea("notes", "Notes")); } public function test_form_dropdown() { $expected = "<select name="shirts">
<option value="small">Small Shirt</option>
<option value="med">Medium Shirt</option>\xa<option value="large" selected="selected">Large Shirt</option>
<option value="xlarge">Extra Large Shirt</option>
</select>\xa"; $options = array("small" => "Small Shirt", "med" => "Medium Shirt", "large" => "Large Shirt", "xlarge" => "Extra Large Shirt"); $this->assertEquals($expected, form_dropdown("shirts", $options, "large")); $expected = "<select name="shirts" multiple="multiple">
<option value="small" selected="selected">Small Shirt</option>
<option value="med">Medium Shirt</option>\xa<option value="large" selected="selected">Large Shirt</option>\xa<option value="xlarge">Extra Large Shirt</option>\xa</select>\xa"; $shirts_on_sale = array("small", "large"); $this->assertEquals($expected, form_dropdown("shirts", $options, $shirts_on_sale)); $options = array("Swedish Cars" => array("volvo" => "Volvo", "saab" => "Saab"), "German Cars" => array("mercedes" => "Mercedes", "audi" => "Audi")); $expected = "<select name="cars" multiple="multiple">
<optgroup label="Swedish Cars">\xa<option value="volvo" selected="selected">Volvo</option>\xa<option value="saab">Saab</option>\xa</optgroup>\xa<optgroup label="German Cars">\xa<option value="mercedes">Mercedes</option>
<option value="audi" selected="selected">Audi</option>
</optgroup>
</select>
"; $this->assertEquals($expected, form_dropdown("cars", $options, array("volvo", "audi"))); } public function test_form_multiselect() { $expected = "<select name="shirts[]"  multiple="multiple">\xa<option value="small">Small Shirt</option>\xa<option value="med" selected="selected">Medium Shirt</option>
<option value="large" selected="selected">Large Shirt</option>
<option value="xlarge">Extra Large Shirt</option>
</select>
"; $options = array("small" => "Small Shirt", "med" => "Medium Shirt", "large" => "Large Shirt", "xlarge" => "Extra Large Shirt"); $this->assertEquals($expected, form_multiselect("shirts[]", $options, array("med", "large"))); } public function test_form_fieldset() { $expected = "<fieldset>\xa<legend>Address Information</legend>
"; $this->assertEquals($expected, form_fieldset("Address Information")); } public function test_form_fieldset_close() { $expected = "</fieldset></div></div>"; $this->assertEquals($expected, form_fieldset_close("</div></div>")); } public function test_form_checkbox() { $expected = "<input type="checkbox" name="newsletter" value="accept" checked="checked"  />\xa"; $this->assertEquals($expected, form_checkbox("newsletter", "accept", TRUE)); } public function test_form_radio() { $expected = "<input type="radio" name="newsletter" value="accept" checked="checked"  />
"; $this->assertEquals($expected, form_radio("newsletter", "accept", TRUE)); } public function test_form_submit() { $expected = "<input type="submit" name="mysubmit" value="Submit Post!"  />\xa"; $this->assertEquals($expected, form_submit("mysubmit", "Submit Post!")); } public function test_form_label() { $expected = "<label for="username">What is your Name</label>"; $this->assertEquals($expected, form_label("What is your Name", "username")); } public function test_form_reset() { $expected = "<input type="reset" name="myreset" value="Reset"  />
"; $this->assertEquals($expected, form_reset("myreset", "Reset")); } public function test_form_button() { $expected = "<button name="name" type="button" >content</button>\xa"; $this->assertEquals($expected, form_button("name", "content")); } public function test_form_close() { $expected = "</form></div></div>"; $this->assertEquals($expected, form_close("</div></div>")); } } ?>

Did this file decode correctly?

Original Code

<?php
 class Form_helper_test extends CI_TestCase { public function set_up() { $this->helper("\x66\x6f\162\155"); } public function test_form_hidden() { $expected = "\12\74\151\156\160\165\164\x20\x74\x79\x70\145\x3d\x22\150\x69\x64\x64\145\156\42\40\x6e\141\155\145\x3d\x22\165\163\x65\x72\156\x61\x6d\145\42\x20\166\141\154\x75\145\x3d\x22\152\157\150\x6e\144\157\x65\42\x20\x2f\76\xa"; $this->assertEquals($expected, form_hidden("\x75\163\x65\x72\x6e\x61\155\145", "\x6a\157\x68\x6e\x64\157\145")); } public function test_form_input() { $expected = "\x3c\151\x6e\160\165\164\40\164\x79\160\145\75\x22\164\x65\170\164\x22\x20\156\141\155\145\x3d\42\165\163\x65\162\x6e\x61\155\145\42\x20\x76\141\154\165\x65\x3d\x22\x6a\157\x68\x6e\x64\x6f\x65\x22\40\x69\144\x3d\42\x75\x73\x65\x72\156\x61\x6d\145\42\40\x6d\141\x78\x6c\x65\x6e\x67\x74\150\75\x22\61\60\x30\x22\40\163\x69\172\145\75\42\x35\60\42\40\163\164\x79\x6c\x65\x3d\42\x77\x69\144\164\150\72\x35\60\45\42\40\40\x2f\x3e\xa"; $data = array("\x6e\141\155\x65" => "\x75\x73\145\162\x6e\141\155\145", "\x69\144" => "\165\163\145\162\x6e\141\155\x65", "\x76\x61\154\165\145" => "\152\x6f\x68\x6e\x64\x6f\145", "\x6d\x61\170\154\x65\156\147\164\150" => "\61\x30\60", "\163\x69\172\x65" => "\65\60", "\x73\164\171\x6c\x65" => "\x77\151\x64\164\150\x3a\x35\x30\x25"); $this->assertEquals($expected, form_input($data)); } public function test_form_password() { $expected = "\74\151\x6e\160\165\x74\40\x74\x79\160\145\75\42\x70\141\x73\x73\167\x6f\x72\x64\42\40\x6e\x61\x6d\x65\x3d\x22\160\141\x73\163\167\x6f\162\x64\x22\x20\x76\x61\154\165\145\x3d\42\x22\40\x20\x2f\76\xa"; $this->assertEquals($expected, form_password("\160\141\163\163\x77\x6f\162\144")); } public function test_form_upload() { $expected = "\74\x69\156\160\165\164\40\x74\x79\x70\145\75\42\x66\x69\154\x65\x22\x20\156\x61\x6d\x65\75\42\141\x74\164\141\x63\150\155\x65\x6e\164\42\40\40\57\x3e\12"; $this->assertEquals($expected, form_upload("\x61\x74\x74\x61\143\x68\155\145\156\164")); } public function test_form_textarea() { $expected = "\x3c\164\145\x78\x74\x61\x72\x65\141\40\x6e\141\155\145\x3d\x22\x6e\157\x74\145\x73\42\x20\x63\x6f\154\x73\x3d\x22\64\60\x22\40\162\157\167\x73\75\x22\61\x30\42\x20\x3e\116\x6f\164\145\x73\x3c\x2f\x74\x65\x78\164\x61\162\x65\x61\76\12"; $this->assertEquals($expected, form_textarea("\x6e\x6f\x74\x65\x73", "\116\x6f\x74\145\163")); } public function test_form_dropdown() { $expected = "\74\163\145\154\145\x63\164\40\x6e\141\155\x65\75\42\x73\150\151\x72\x74\163\x22\x3e\12\x3c\x6f\x70\x74\x69\157\156\x20\166\x61\154\x75\x65\75\42\x73\x6d\141\154\x6c\42\76\x53\155\141\154\x6c\40\123\150\151\x72\x74\74\x2f\x6f\x70\164\151\157\x6e\76\12\x3c\157\x70\164\x69\157\x6e\x20\166\x61\154\165\x65\75\42\155\x65\x64\42\x3e\115\x65\144\x69\165\155\x20\x53\150\151\x72\x74\x3c\57\157\x70\x74\x69\x6f\156\76\xa\x3c\157\x70\x74\151\x6f\156\40\166\x61\x6c\165\x65\75\x22\154\141\162\147\145\42\x20\x73\145\x6c\145\143\164\145\x64\x3d\42\163\x65\x6c\x65\143\164\x65\144\x22\76\114\x61\x72\x67\x65\x20\123\x68\x69\x72\164\74\57\x6f\x70\x74\x69\x6f\x6e\76\12\x3c\x6f\x70\x74\x69\x6f\156\x20\x76\141\154\x75\145\x3d\42\170\x6c\x61\x72\147\145\42\x3e\105\170\x74\x72\x61\40\x4c\x61\162\x67\145\x20\x53\150\151\162\164\x3c\57\157\x70\164\x69\x6f\156\x3e\12\x3c\x2f\x73\145\154\145\x63\164\x3e\xa"; $options = array("\163\x6d\141\x6c\x6c" => "\x53\x6d\x61\154\154\40\123\150\151\x72\164", "\155\145\144" => "\x4d\145\x64\x69\x75\155\x20\x53\150\x69\x72\164", "\x6c\x61\162\x67\145" => "\114\x61\162\x67\145\40\123\x68\151\162\x74", "\x78\x6c\x61\162\x67\145" => "\105\x78\x74\162\141\x20\x4c\141\x72\x67\145\x20\x53\150\151\x72\164"); $this->assertEquals($expected, form_dropdown("\163\150\151\162\164\163", $options, "\154\141\x72\147\x65")); $expected = "\x3c\x73\x65\x6c\145\143\164\x20\156\x61\x6d\145\75\42\163\150\x69\162\x74\163\x22\40\155\165\x6c\164\x69\160\154\145\x3d\42\155\x75\x6c\164\x69\x70\x6c\145\42\x3e\12\74\x6f\160\x74\151\157\x6e\40\166\141\154\x75\x65\x3d\42\163\155\x61\x6c\x6c\42\x20\163\x65\154\x65\x63\164\145\x64\x3d\42\163\x65\x6c\x65\x63\x74\145\144\42\x3e\x53\x6d\141\154\x6c\x20\123\150\x69\x72\x74\74\x2f\x6f\160\164\x69\x6f\156\x3e\12\x3c\157\160\x74\151\157\156\x20\x76\141\154\x75\145\75\42\x6d\x65\x64\x22\x3e\115\145\x64\x69\165\155\40\x53\x68\x69\x72\x74\74\x2f\x6f\160\164\151\157\x6e\x3e\xa\x3c\157\x70\164\151\157\156\x20\166\x61\x6c\165\145\x3d\x22\154\141\162\147\x65\42\x20\163\145\154\145\x63\x74\145\x64\x3d\42\x73\145\154\145\x63\x74\145\x64\x22\76\x4c\141\x72\147\x65\40\123\150\x69\162\164\x3c\x2f\x6f\160\164\151\157\156\76\xa\x3c\157\x70\x74\x69\157\156\x20\x76\141\154\x75\145\75\x22\170\154\x61\x72\x67\145\42\76\105\x78\164\162\x61\40\114\141\x72\147\x65\40\x53\150\x69\162\x74\74\57\157\160\x74\151\157\156\76\xa\x3c\57\x73\x65\154\145\143\x74\76\xa"; $shirts_on_sale = array("\x73\x6d\x61\x6c\x6c", "\x6c\x61\x72\x67\x65"); $this->assertEquals($expected, form_dropdown("\163\150\x69\162\164\163", $options, $shirts_on_sale)); $options = array("\x53\x77\145\x64\151\x73\150\x20\x43\141\x72\163" => array("\x76\157\x6c\166\157" => "\x56\157\154\166\x6f", "\163\x61\x61\x62" => "\x53\x61\141\x62"), "\107\145\162\155\x61\156\x20\103\141\x72\x73" => array("\x6d\145\x72\x63\145\144\x65\163" => "\115\145\162\143\x65\144\x65\163", "\x61\x75\x64\151" => "\101\x75\144\151")); $expected = "\74\x73\145\x6c\x65\143\164\x20\x6e\141\155\x65\x3d\x22\x63\x61\x72\163\x22\x20\155\165\x6c\164\x69\160\x6c\145\75\42\x6d\165\154\164\x69\160\154\145\x22\76\12\74\157\160\x74\147\162\x6f\165\160\x20\x6c\x61\x62\x65\x6c\x3d\42\x53\167\145\x64\x69\x73\x68\40\103\141\162\163\42\x3e\xa\x3c\x6f\160\x74\x69\157\156\40\x76\x61\154\x75\x65\75\x22\166\x6f\154\166\157\x22\40\163\145\x6c\145\x63\164\145\x64\75\42\x73\x65\x6c\x65\x63\x74\145\x64\42\76\x56\157\154\166\x6f\74\57\x6f\x70\x74\x69\x6f\x6e\x3e\xa\x3c\x6f\x70\164\151\x6f\156\40\166\x61\154\x75\x65\75\x22\163\x61\x61\x62\42\x3e\123\x61\141\x62\x3c\57\x6f\x70\x74\151\x6f\x6e\x3e\xa\74\x2f\x6f\x70\164\x67\x72\157\165\x70\76\xa\74\157\160\x74\x67\162\157\x75\160\x20\154\x61\x62\x65\154\75\42\107\145\162\x6d\x61\156\40\103\141\162\x73\x22\x3e\xa\74\157\x70\x74\x69\157\x6e\x20\166\141\x6c\x75\145\x3d\42\155\145\162\143\x65\144\145\x73\42\x3e\x4d\145\162\x63\145\x64\145\163\74\57\x6f\x70\x74\151\157\156\x3e\12\74\157\x70\x74\151\157\156\40\166\141\154\165\x65\x3d\42\141\165\144\x69\x22\40\163\145\154\145\143\x74\145\144\75\x22\x73\145\154\x65\x63\x74\145\144\x22\x3e\101\165\x64\151\x3c\57\157\x70\x74\151\x6f\x6e\x3e\12\x3c\57\157\x70\164\147\x72\157\165\x70\x3e\12\74\x2f\163\145\x6c\x65\x63\x74\x3e\12"; $this->assertEquals($expected, form_dropdown("\143\x61\x72\x73", $options, array("\166\157\x6c\x76\157", "\141\x75\144\151"))); } public function test_form_multiselect() { $expected = "\x3c\163\145\154\x65\143\x74\x20\x6e\141\155\x65\75\42\x73\150\151\162\x74\163\x5b\135\x22\x20\x20\155\165\x6c\164\151\x70\154\145\x3d\x22\155\165\x6c\x74\151\160\154\145\42\76\xa\x3c\x6f\x70\x74\x69\157\x6e\40\x76\x61\154\165\x65\x3d\42\163\155\141\x6c\154\x22\76\123\x6d\x61\154\x6c\x20\x53\x68\151\x72\x74\74\57\x6f\x70\164\151\x6f\156\76\xa\74\157\x70\164\x69\157\156\x20\x76\x61\154\165\x65\x3d\42\x6d\x65\x64\42\x20\x73\145\154\145\143\x74\145\144\x3d\x22\x73\x65\x6c\x65\x63\164\145\144\42\x3e\115\145\x64\x69\x75\x6d\40\123\150\151\162\164\74\57\x6f\160\164\151\157\156\x3e\12\x3c\157\160\x74\x69\157\156\40\166\x61\154\165\145\75\x22\154\x61\162\x67\145\42\x20\163\145\154\145\x63\x74\145\x64\x3d\42\163\x65\154\x65\x63\x74\145\x64\42\x3e\114\x61\x72\147\x65\40\123\150\x69\162\164\x3c\x2f\x6f\x70\164\x69\157\x6e\x3e\12\x3c\157\160\164\151\157\x6e\40\166\x61\x6c\165\x65\x3d\x22\x78\x6c\x61\x72\147\x65\x22\76\x45\170\164\x72\x61\40\114\x61\x72\x67\145\40\x53\150\x69\x72\164\74\x2f\157\160\x74\151\x6f\156\76\12\x3c\x2f\x73\x65\x6c\x65\143\164\x3e\12"; $options = array("\163\155\x61\x6c\154" => "\123\155\x61\x6c\154\40\x53\150\151\162\x74", "\x6d\x65\144" => "\x4d\145\x64\x69\165\155\40\123\150\x69\162\164", "\x6c\x61\162\x67\145" => "\x4c\x61\x72\147\x65\40\123\150\151\162\x74", "\x78\154\x61\162\147\x65" => "\x45\170\x74\x72\141\40\114\141\x72\x67\145\40\123\150\151\x72\x74"); $this->assertEquals($expected, form_multiselect("\163\x68\151\162\164\x73\x5b\x5d", $options, array("\x6d\x65\144", "\154\141\162\147\x65"))); } public function test_form_fieldset() { $expected = "\74\x66\x69\x65\154\144\163\x65\x74\76\xa\74\154\145\147\145\x6e\x64\76\101\x64\144\x72\145\163\163\40\x49\156\146\x6f\162\155\x61\164\151\157\x6e\74\x2f\x6c\x65\147\145\x6e\x64\76\12"; $this->assertEquals($expected, form_fieldset("\x41\144\x64\162\x65\163\163\40\111\156\146\157\162\x6d\141\164\x69\157\156")); } public function test_form_fieldset_close() { $expected = "\74\x2f\146\151\x65\154\144\x73\145\164\x3e\74\57\x64\151\166\76\74\57\x64\x69\x76\x3e"; $this->assertEquals($expected, form_fieldset_close("\x3c\x2f\x64\151\166\x3e\74\x2f\144\x69\166\76")); } public function test_form_checkbox() { $expected = "\x3c\151\156\160\165\x74\x20\164\x79\160\x65\x3d\x22\x63\x68\x65\x63\153\142\x6f\x78\x22\40\x6e\141\155\145\75\x22\156\145\167\163\154\x65\x74\x74\x65\162\x22\40\166\141\x6c\165\145\x3d\42\141\x63\143\145\160\164\42\x20\x63\150\x65\x63\153\145\x64\75\x22\143\150\145\143\x6b\145\x64\x22\40\x20\x2f\x3e\xa"; $this->assertEquals($expected, form_checkbox("\x6e\145\167\x73\154\x65\164\164\145\162", "\141\143\x63\145\x70\164", TRUE)); } public function test_form_radio() { $expected = "\x3c\x69\x6e\x70\x75\164\x20\164\171\160\145\75\42\162\141\x64\151\157\42\x20\156\141\x6d\145\75\x22\156\145\x77\x73\154\x65\164\164\145\x72\42\40\x76\x61\x6c\165\x65\75\42\141\x63\143\x65\160\x74\42\x20\x63\150\x65\x63\x6b\x65\x64\x3d\x22\143\x68\145\143\x6b\x65\144\x22\x20\x20\x2f\76\12"; $this->assertEquals($expected, form_radio("\156\x65\167\163\x6c\x65\164\x74\145\162", "\x61\143\143\x65\x70\x74", TRUE)); } public function test_form_submit() { $expected = "\x3c\151\156\160\165\164\40\x74\171\x70\x65\x3d\x22\163\x75\x62\155\151\164\x22\x20\x6e\x61\x6d\145\75\x22\155\171\163\165\x62\155\x69\x74\x22\40\166\141\x6c\x75\145\x3d\42\x53\x75\142\x6d\151\x74\40\120\157\163\164\41\42\x20\x20\x2f\x3e\xa"; $this->assertEquals($expected, form_submit("\x6d\171\163\x75\142\x6d\x69\x74", "\123\x75\x62\x6d\151\x74\40\x50\x6f\163\164\x21")); } public function test_form_label() { $expected = "\x3c\154\x61\x62\145\154\x20\x66\157\162\x3d\42\x75\x73\x65\162\156\141\155\x65\x22\76\x57\150\x61\x74\x20\151\x73\40\171\157\165\x72\x20\116\141\155\x65\74\x2f\154\x61\x62\x65\x6c\x3e"; $this->assertEquals($expected, form_label("\x57\x68\141\x74\40\x69\163\40\x79\x6f\165\x72\x20\116\141\x6d\x65", "\x75\x73\x65\x72\156\141\x6d\145")); } public function test_form_reset() { $expected = "\x3c\151\x6e\x70\x75\x74\x20\x74\171\x70\x65\x3d\x22\x72\145\x73\x65\164\42\40\x6e\x61\155\x65\75\42\x6d\x79\x72\145\163\x65\164\x22\40\166\141\x6c\x75\145\x3d\42\122\145\x73\x65\164\42\40\x20\57\76\12"; $this->assertEquals($expected, form_reset("\x6d\x79\162\145\163\145\164", "\x52\x65\x73\145\x74")); } public function test_form_button() { $expected = "\74\142\165\164\164\157\x6e\x20\156\x61\x6d\x65\x3d\x22\x6e\141\155\145\42\40\x74\171\x70\x65\x3d\42\x62\x75\x74\164\157\156\x22\40\x3e\x63\x6f\x6e\164\x65\156\164\74\x2f\x62\x75\164\x74\x6f\156\76\xa"; $this->assertEquals($expected, form_button("\156\x61\155\x65", "\x63\x6f\156\164\x65\x6e\164")); } public function test_form_close() { $expected = "\74\x2f\x66\x6f\x72\x6d\76\74\57\144\x69\x76\76\74\x2f\x64\x69\166\76"; $this->assertEquals($expected, form_close("\74\57\x64\x69\x76\x3e\x3c\57\144\151\x76\x3e")); } }

Function Calls

None

Variables

None

Stats

MD5 8fe01951cd9e8282c5c2db9db4484b06
Eval Count 0
Decode Time 102 ms