This file has been truncated, but you can view the full file.
This file contains hidden or 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
| { "_id" : "chadicus-csv", "owner" : "chadicus", "package" : "csv", "repository" : "chadicus/csv-php", "source" : "https://github.com/chadicus/csv-php", "stars" : 0, "watchers" : 1, "forks" : 0, "issues" : 0, "avatar" : "https://avatars.githubusercontent.com/u/1182337?v=3", "keywords" : [ "csv", "delimited", "file", "io" ], "description" : "Collection of classes to work with csv files", "tags" : [ "dev-master", "v1", "v0" ], "dev-master" : "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<project title=\"API Documentation\" version=\"2.8.5\"><partials/><file path=\"Reader.php\" generated-path=\"Reader.html\" hash=\"d7384edf73c636c87e502f7e2b63f3e1\" package=\"Default\"><docblock line=\"0\"><description/><long-description/><tag name=\"package\" line=\"0\" description=\"Default\"/></docblock><class final=\"false\" abstract=\"false\" namespace=\"Chadicus\\Csv\" line=\"8\" package=\"Default\"><extends/><implements>\\Iterator</implements><name>Reader</name><full_name>\\Chadicus\\Csv\\Reader</full_name><docblock line=\" |
This file contains hidden or 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 | |
| //assumes "chadicus/dom" : "dev-master" requirement in composer.json | |
| require_once 'vendor/autoload.php'; | |
| use Chadicus\Util; | |
| $xml = <<<XML |
This file contains hidden or 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 | |
| interface UserFactoryInterface | |
| { | |
| /** | |
| * Create a new instance of UserEntityInterface | |
| * | |
| * @param array $data The data for the new user | |
| * | |
| * @return UserEntityInterface |
This file contains hidden or 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 | |
| //User input for a Name field | |
| $input = 'John'; | |
| //Produces PHP Notice: Undefined offset: 1 | |
| list($firstName, $lastName) = explode(' ', $input); | |
| //ensure offset 1 always exists | |
| list($firstName, $lastName) = explode(' ', $input) + [1 => null]; |
This file contains hidden or 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 | |
| $json = file_get_contents('https://gist.githubusercontent.com/chadicus/aaa4714944a6340d8184/raw/22d8df40f0ab64b20ca54d08a1fa60308ea38278/books.json'); | |
| $books = json_decode($json, true); | |
| $matched = preg_grep('/xml/i', array_column($books, 'description')); |
This file contains hidden or 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
| [ | |
| { | |
| "author": "Gambardella, Matthew", | |
| "title": "XML Developer's Guide", | |
| "genre": "Computer", | |
| "price": 44.95, | |
| "publishDate": 970372800, | |
| "description": "An in-depth look at creating applications with XML." | |
| }, | |
| { |
This file contains hidden or 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 | |
| $timezone = new \DateTimeZone('HST'); | |
| assert($timezone->getName() === 'Pacific/Honolulu', 'Timezone name was not Pacific/Honolulu'); |
This file contains hidden or 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 | |
| function getPaths($arrayOrScalar, $delimiter = '/', array $paths = array(), $string = '') | |
| { | |
| if (is_scalar($arrayOrScalar)) { | |
| $paths[$string] = $arrayOrScalar; | |
| return $paths; | |
| } | |
| if (!is_array($arrayOrScalar)) { |
This file contains hidden or 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
| #!/usr/bin/env php | |
| <?php | |
| chdir(__DIR__); | |
| $returnStatus = null; | |
| passthru('composer install --dev', $returnStatus); | |
| if ($returnStatus !== 0) { | |
| exit(1); | |
| } |
This file contains hidden or 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 | |
| require_once 'vendor/autoload.php'; | |
| $datax = Zend_Db::factory('Mysqli', [ | |
| 'host' => 'host', | |
| 'username' => 'username', | |
| 'password' => 'password', | |
| 'dbname' => 'database name', | |
| ]); |