This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* php array to xml conversion even for nested data | |
* | |
* @link http://stackoverflow.com/q/14136714/367456 | |
* @see http://stackoverflow.com/a/14143759/367456 for description | |
* @author hakre <http://hakre.wordpress.com/credits> | |
*/ | |
$array = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Supported Functions: | |
mysql_connect().................: Supported | |
mysql_pconnect()................: Supported | |
mysql_close()...................: Supported | |
mysql_select_db()...............: Supported | |
mysql_query()...................: Supported | |
mysql_unbuffered_query()........: n/a | |
mysql_db_query()................: n/a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Codepad Viper Remote Image Viewer | |
*/ | |
$url = 'http://i.stack.imgur.com/Pa9s3.png'; | |
if (isset($_GET['g'])) $url = $_GET['g']; | |
echo '<table border="1"><tr><th colspan="3"><a href="', htmlspecialchars($url), '">', htmlspecialchars($url), '</a></th></tr>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<response><status><version>4.2</version><code>0</code><message>Success</message></status><songs><song><tracks><track><foreign_release_id>spotify-WW:release:35dJsQDEr549O5DTFUy3uM</foreign_release_id><catalog>spotify-WW</catalog><foreign_id>spotify-WW:track:2u02eLj96Atd6TBxkH9YvN</foreign_id><id>TRYJFDJ1338646B794</id></track><track><foreign_release_id>spotify-WW:release:4bUUD51RuaeszLjN3PDd7F</foreign_release_id><catalog>spotify-WW</catalog><foreign_id>spotify-WW:track:69idM1oJ3K2Xvv0NWyJS9M</foreign_id><id>TRDCOZR133A3CA331F</id></track><track><foreign_release_id>spotify-WW:release:6UHhmTLl9T1scRYLmpHcDX</foreign_release_id><catalog>spotify-WW</catalog><foreign_id>spotify-WW:track:08Bfk5Y2S5fCxgxk371Eel</foreign_id><id>TRFVQLU1338645C5A4</id></track><track><foreign_release_id>spotify-WW:release:3SA9lShm1rzFIsUd56GhT5</foreign_release_id><catalog>spotify-WW</catalog><foreign_id>spotify-WW:track:5VWTuwU4yQ6ATUPrX7hOsN</foreign_id><id>TRTZNFF13386461DA1</id></track><track> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Output buffer for large output to temporary file on disk (>2MB) | |
* | |
* @link http://stackoverflow.com/questions/5446647/how-can-i-use-var-dump-output-buffering-without-memory-errors/ | |
*/ | |
/** | |
* Iterate over lines of a stream resource. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @link http://stackoverflow.com/questions/13865149/speeding-up-xml-schema-validations-of-a-batch-of-xml-files-against-the-same-xml | |
*/ | |
$mapping = [ | |
'http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd' => 'schema/xhtml1-transitional.xsd', | |
'http://www.w3.org/2001/xml.xsd' => 'schema/xml.xsd', | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class NoRewindLimitIterator extends IteratorIterator | |
{ | |
private $start, $count, $next; | |
public function __construct($it, $start, $count) { | |
parent::__construct($it); | |
$this->start = max(0, $start); | |
$this->count = max(0, $count); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ANSI_X3.4-1968 ANSI_X3.4-1986 ASCII CP367 IBM367 ISO-IR-6 ISO646-US ISO_646.IRV:1991 US US-ASCII CSASCII | |
UTF-8 | |
ISO-10646-UCS-2 UCS-2 CSUNICODE | |
UCS-2BE UNICODE-1-1 UNICODEBIG CSUNICODE11 | |
UCS-2LE UNICODELITTLE | |
ISO-10646-UCS-4 UCS-4 CSUCS4 | |
UCS-4BE | |
UCS-4LE | |
UTF-16 | |
UTF-16BE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @link http://stackoverflow.com/q/10181054/367456 | |
*/ | |
/** | |
* Extending from a TraversableDecorator allows to decorate (change) the Iterator | |
* being Traversed without changing the object. | |
*/ |