1/* 2 * More info at: http://phpjs.org 3 * 4 * This is version: 3.26 5 * php.js is copyright 2012 Kevin van Zonneveld. 6 * 7 * Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld 8 * (http://kevin.vanzonneveld.net), Onno Marsman, Theriault, Michael White 9 * (http://getsprink.com), Waldo Malqui Silva, Paulo Freitas, Jack, Jonas 10 * Raoni Soares Silva (http://www.jsfromhell.com), Philip Peterson, Legaev 11 * Andrey, Ates Goral (http://magnetiq.com), Alex, Ratheous, Martijn Wieringa, 12 * RafaŠKukawski (http://blog.kukawski.pl), lmeyrick 13 * (https://sourceforge.net/projects/bcmath-js/), Nate, Philippe Baumann, 14 * Enrique Gonzalez, Webtoolkit.info (http://www.webtoolkit.info/), Carlos R. 15 * L. Rodrigues (http://www.jsfromhell.com), Ash Searle 16 * (http://hexmen.com/blog/), Jani Hartikainen, travc, Ole Vrijenhoek, 17 * Erkekjetter, Michael Grier, RafaŠKukawski (http://kukawski.pl), Johnny 18 * Mast (http://www.phpvrouwen.nl), T.Wild, d3x, 19 * http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript, 20 * RafaŠKukawski (http://blog.kukawski.pl/), stag019, pilus, WebDevHobo 21 * (http://webdevhobo.blogspot.com/), marrtins, GeekFG 22 * (http://geekfg.blogspot.com), Andrea Giammarchi 23 * (http://webreflection.blogspot.com), Arpad Ray (mailto:[email protected]), 24 * gorthaur, Paul Smith, Tim de Koning (http://www.kingsquare.nl), Joris, Oleg 25 * Eremeev, Steve Hilder, majak, gettimeofday, KELAN, Josh Fraser 26 * (http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/), 27 * Marc Palau, Kevin van Zonneveld (http://kevin.vanzonneveld.net/), Martin 28 * (http://www.erlenwiese.de/), Breaking Par Consulting Inc 29 * (http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7), 30 * Chris, Mirek Slugen, saulius, Alfonso Jimenez 31 * (http://www.alfonsojimenez.com), Diplom@t (http://difane.com/), felix, 32 * Mailfaker (http://www.weedem.fr/), Tyler Akins (http://rumkin.com), Caio 33 * Ariede (http://caioariede.com), Robin, Kankrelune 34 * (http://www.webfaktory.info/), Karol Kowalski, Imgen Tata 35 * (http://www.myipdf.com/), mdsjack (http://www.mdsjack.bo.it), Dreamer, 36 * Felix Geisendoerfer (http://www.debuggable.com/felix), Lars Fischer, AJ, 37 * David, Aman Gupta, Michael White, Public Domain 38 * (http://www.json.org/json2.js), Steven Levithan 39 * (http://blog.stevenlevithan.com), Sakimori, Pellentesque Malesuada, 40 * Thunder.m, Dj (http://phpjs.org/functions/htmlentities:425#comment_134018), 41 * Steve Clay, David James, Francois, class_exists, nobbler, T. Wild, Itsacon 42 * (http://www.itsacon.net/), date, Ole Vrijenhoek (http://www.nervous.nl/), 43 * Fox, Raphael (Ao RUDLER), Marco, noname, Mateusz "loonquawl" Zalega, Frank 44 * Forte, Arno, ger, mktime, john (http://www.jd-tech.net), Nick Kolosov 45 * (http://sammy.ru), marc andreu, Scott Cariss, Douglas Crockford 46 * (http://javascript.crockford.com), madipta, Slawomir Kaniecki, 47 * ReverseSyntax, Nathan, Alex Wilson, kenneth, Bayron Guevara, Adam Wallner 48 * (http://web2.bitbaro.hu/), paulo kuong, jmweb, Lincoln Ramsay, djmix, 49 * Pyerre, Jon Hohle, Thiago Mata (http://thiagomata.blog.com), lmeyrick 50 * (https://sourceforge.net/projects/bcmath-js/this.), Linuxworld, duncan, 51 * Gilbert, Sanjoy Roy, Shingo, sankai, Oskar Larsson Högfeldt 52 * (http://oskar-lh.name/), Denny Wardhana, 0m3r, Everlasto, Subhasis Deb, 53 * josh, jd, Pier Paolo Ramon (http://www.mastersoup.com/), P, merabi, Soren 54 * Hansen, Eugene Bulkin (http://doubleaw.com/), Der Simon 55 * (http://innerdom.sourceforge.net/), echo is bad, Ozh, XoraX 56 * (http://www.xorax.info), EdorFaus, JB, J A R, Marc Jansen, Francesco, LH, 57 * Stoyan Kyosev (http://www.svest.org/), nord_ua, omid 58 * (http://phpjs.org/functions/380:380#comment_137122), Brad Touesnard, MeEtc 59 * (http://yass.meetcweb.com), Peter-Paul Koch 60 * (http://www.quirksmode.org/js/beat.html), Olivier Louvignes 61 * (http://mg-crea.com/), T0bsn, Tim Wiel, Bryan Elliott, Jalal Berrami, 62 * Martin, JT, David Randall, Thomas Beaucourt (http://www.webapp.fr), taith, 63 * vlado houba, Pierre-Luc Paour, Kristof Coomans (SCK-CEN Belgian Nucleair 64 * Research Centre), Martin Pool, Kirk Strobeck, Rick Waldron, Brant Messenger 65 * (http://www.brantmessenger.com/), Devan Penner-Woelk, Saulo Vallory, Wagner 66 * B. Soares, Artur Tchernychev, Valentina De Rosa, Jason Wong 67 * (http://carrot.org/), Christoph, Daniel Esteban, strftime, Mick@el, rezna, 68 * Simon Willison (http://simonwillison.net), Anton Ongson, Gabriel Paderni, 69 * Marco van Oort, penutbutterjelly, Philipp Lenssen, Bjorn Roesbeke 70 * (http://www.bjornroesbeke.be/), Bug?, Eric Nagel, Tomasz Wesolowski, 71 * Evertjan Garretsen, Bobby Drake, Blues (http://tech.bluesmoon.info/), Luke 72 * Godfrey, Pul, uestla, Alan C, Ulrich, Rafal Kukawski, Yves Sucaet,
73 * sowberry, Norman "zEh" Fuchs, hitwork, Zahlii, johnrembo, Nick Callen, 74 * Steven Levithan (stevenlevithan.com), ejsanders, Scott Baker, Brian Tafoya 75 * (http://www.premasolutions.com/), Philippe Jausions 76 * (http://pear.php.net/user/jausions), Aidan Lister 77 * (http://aidanlister.com/), Rob, e-mike, HKM, ChaosNo1, metjay, strcasecmp, 78 * strcmp, Taras Bogach, jpfle, Alexander Ermolaev 79 * (http://snippets.dzone.com/user/AlexanderErmolaev), DxGx, kilops, Orlando, 80 * dptr1988, Le Torbi, James (http://www.james-bell.co.uk/), Pedro Tainha 81 * (http://www.pedrotainha.com), James, Arnout Kazemier 82 * (http://www.3rd-Eden.com), Chris McMacken, gabriel paderni, Yannoo, 83 * FGFEmperor, baris ozdil, Tod Gentille, Greg Frazier, jakes, 3D-GRAF, Allan 84 * Jensen (http://www.winternet.no), Howard Yeend, Benjamin Lupton, davook, 85 * daniel airton wermann (http://wermann.com.br), Atli Ãór, Maximusya, Ryan 86 * W Tenney (http://ryan.10e.us), Alexander M Beedie, fearphage 87 * (http://http/my.opera.com/fearphage/), Nathan Sepulveda, Victor, Matteo, 88 * Billy, stensi, Cord, Manish, T.J. Leahy, Riddler 89 * (http://www.frontierwebdev.com/), RafaÅ Kukawski, FremyCompany, Matt 90 * Bradley, Tim de Koning, Luis Salazar (http://www.freaky-media.com/), Diogo 91 * Resende, Rival, Andrej Pavlovic, Garagoth, Le Torbi 92 * (http://www.letorbi.de/), Dino, Josep Sanz (http://www.ws3.es/), rem, 93 * Russell Walker (http://www.nbill.co.uk/), Jamie Beck 94 * (http://www.terabit.ca/), setcookie, Michael, YUI Library: 95 * http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, Blues at 96 * http://hacks.bluesmoon.info/strftime/strftime.js, Ben 97 * (http://benblume.co.uk/), DtTvB 98 * (http://dt.in.th/2008-09-16.string-length-in-bytes.html), Andreas, William, 99 * meo, incidence, Cagri Ekin, Amirouche, Amir Habibi 100 * (http://www.residence-mixte.com/), Luke Smith (http://lucassmith.name), 101 * Kheang Hok Chin (http://www.distantia.ca/), Jay Klehr, Lorenzo Pisani, 102 * Tony, Yen-Wei Liu, Greenseed, mk.keck, Leslie Hoare, dude, booeyOH, Ben 103 * Bryan 104 * 105 * Dual licensed under the MIT (MIT-LICENSE.txt) 106 * and GPL (GPL-LICENSE.txt) licenses. 107 * 108 * Permission is hereby granted, free of charge, to any person obtaining a 109 * copy of this software and associated documentation files (the 110 * "Software"), to deal in the Software without restriction, including 111 * without limitation the rights to use, copy, modify, merge, publish, 112 * distribute, sublicense, and/or sell copies of the Software, and to 113 * permit persons to whom the Software is furnished to do so, subject to 114 * the following conditions: 115 * 116 * The above copyright notice and this permission notice shall be included 117 * in all copies or substantial portions of the Software. 118 * 119 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 120 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 121 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 122 * IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES 123 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 124 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 125 * OTHER DEALINGS IN THE SOFTWARE. 126 */ 127 128 129// Compression: minified 130 131 132function sha1(str){var rotate_left=function(n,s){var t4=(n<<s)|(n>>>(32-s));return t4;};var cvt_hex=function(val){var str="";var i;var v;for(i=7;i>=0;i--){v=(val>>>(i*4))&0x0f;str+=v.toString(16);} 133return str;};var blockstart;var i,j;var W=new Array(80);var H0=0x67452301;var H1=0xEFCDAB89;var H2=0x98BADCFE;var H3=0x10325476;var H4=0xC3D2E1F0;var A,B,C,D,E;var temp;str=this.utf8_encode(str);var str_len=str.length;var word_array=[];for(i=0;i<str_len-3;i+=4){j=str.charCodeAt(i)<<24|str.charCodeAt(i+1)<<16|str.charCodeAt(i+2)<<8|str.charCodeAt(i+3);word_array.push(j);} 134switch(str_len%4){case 0:i=0x080000000;break;case 1:i=str.charCodeAt(str_len-1)<<24|0x0800000;break;case 2:i=str.charCodeAt(str_len-2)<<24|str.charCodeAt(str_len-1)<<16|0x08000;break;case 3:i=str.charCodeAt(str_len-3)<<24|str.charCodeAt(str_len-2)<<16|str.charCodeAt(str_len-1)<<8|0x80;break;} 135word_array.push(i);while((word_array.length%16)!=14){word_array.push(0);} 136word_array.push(str_len>>>29);word_array.push((str_len<<3)&0x0ffffffff);for(blockstart=0;blockstart<word_array.length;blockstart+=16){for(i=0;i<16;i++){W[i]=word_array[blockstart+i];} 137for(i=16;i<=79;i++){W[i]=rotate_left(W[i-3]^W[i-8]^W[i-14]^W[i-16],1);} 138A=H0;B=H1;C=H2;D=H3;E=H4;for(i=0;i<=19;i++){temp=(rotate_left(A,5)+((B&C)|(~B&D))+E+W[i]+0x5A827999)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp;} 139for(i=20;i<=39;i++){temp=(rotate_left(A,5)+(B^C^D)+E+W[i]+0x6ED9EBA1)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp;} 140for(i=40;i<=59;i++){temp=(rotate_left(A,5)+((B&C)|(B&D)|(C&D))+E+W[i]+0x8F1BBCDC)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp;} 141for(i=60;i<=79;i++){temp=(rotate_left(A,5)+(B^C^D)+E+W[i]+0xCA62C1D6)&0x0ffffffff;E=D;D=C;C=rotate_left(B,30);B=A;A=temp;} 142H0=(H0+A)&0x0ffffffff;H1=(H1+B)&0x0ffffffff;H2=(H2+C)&0x0ffffffff;H3=(H3+D)&0x0ffffffff;H4=(H4+E)&0x0ffffffff;} 143temp=cvt_hex(H0)+cvt_hex(H1)+cvt_hex(H2)+cvt_hex(H3)+cvt_hex(H4);return temp.toLowerCase();} 144function strip_tags(input,allowed){allowed=(((allowed||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join('');var tags=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,commentsAndPhpTags=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return input.replace(commentsAndPhpTags,'').replace(tags,function($0,$1){return allowed.indexOf('<'+$1.toLowerCase()+'>')>-1?$0:'';});} 145function utf8_encode(argString){if(argString===null||typeof argString==="undefined"){return"";} 146var string=(argString+'');var utftext="",start,end,stringl=0;start=end=0;stringl=string.length;for(var n=0;n<stringl;n++){var c1=string.charCodeAt(n);var enc=null;if(c1<128){end++;}else if(c1>127&&c1<2048){enc=String.fromCharCode((c1>>6)|192)+String.fromCharCode((c1&63)|128);}else{enc=String.fromCharCode((c1>>12)|224)+String.fromCharCode(((c1>>6)&63)|128)+String.fromCharCode((c1&63)|128);} 147if(enc!==null){if(end>
147start){utftext+=string.slice(start,end);} 148utftext+=enc;start=end=n+1;}} 149if(end>start){utftext+=string.slice(start,stringl);} 150return utftext;}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.