Skip to content

Instantly share code, notes, and snippets.

@aaronjorbin
Created August 29, 2016 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronjorbin/6d8ae5ce0473734255ec70b06c109898 to your computer and use it in GitHub Desktop.
Save aaronjorbin/6d8ae5ce0473734255ec70b06c109898 to your computer and use it in GitHub Desktop.
<?php
namespace Symfony\Component\Yaml;
class Yaml
{
public static function dump()
{
die( 'Bad File' );
}
}
{
"name": "jorbin/namespaces",
"authors": [
{
"name": "Aaron Jorbin",
"email": "aaron@jorb.in"
}
],
"require": {
"symfony/yaml": "^3.1"
}
}
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "b87a6ab585e97e78a80b1819c3c2956a",
"content-hash": "8657dae39e95a86827d152758b4497c6",
"packages": [
{
"name": "symfony/yaml",
"version": "v3.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "1819adf2066880c7967df7180f4f662b6f0567ac"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/1819adf2066880c7967df7180f4f662b6f0567ac",
"reference": "1819adf2066880c7967df7180f4f662b6f0567ac",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.1-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Yaml\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2016-07-17 14:02:08"
}
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": [],
"platform-dev": []
}
<?php
require 'vendor/autoload.php';
require 'badfile.php';
use Symfony\Component\Yaml\Yaml;
$array = array(
'foo' => 'bar',
'bar' => array('foo' => 'bar', 'bar' => 'baz'),
);
var_dump( Yaml::dump($array) );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment