Skip to content

Instantly share code, notes, and snippets.

Avatar

Klauss Santana klaussantana

View GitHub Profile
View stdClass.php
<?PHP
/****
* stdClass Inheritance Failure
* ================================================================================
*
* This example shows how stdClass is not inherited in classes definitions that
* do not explicit it.
*
*/
View gist:3703175
<?php
class MinhaClasse
{
public
function HelloWorld()
{
echo 'Hello World';
}
}
@klaussantana
klaussantana / simple.xml.creation.php
Created Sep 11, 2012
Gerando um arquivo XML no PHP 5.
View simple.xml.creation.php
<?php
$XML = new SimpleXMLElement('<Configuration></Configuration>', null, false);
$XML->addChild('Teste', 'Um bom teste de criação de XML.');
$XML->asXML('teste.xml');
?>
You can’t perform that action at this time.