Skip to content

Commit c04e0cf

Browse files
committed
lib commit
1 parent 5b1a455 commit c04e0cf

25 files changed

+990
-0
lines changed

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2011 Raúl Fraile
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

Whitespace-only changes.

examples/array.php

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
require_once __DIR__.'/../lib/Ladybug.php';
4+
5+
$var1 = array();
6+
7+
$var1[0] = array(
8+
'name' => 'Raul',
9+
'age' => 29
10+
);
11+
12+
$var1[1] = array(
13+
'name' => 'John',
14+
'age' => 27
15+
);
16+
17+
18+
ladybug_dump($var1);

examples/dump_and_die.php

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
require_once __DIR__.'/../lib/Ladybug.php';
4+
5+
$var1 = 'hello world!';
6+
7+
ladybug_dump_die($var1);
8+
9+
echo 'This code is unreachable!';

examples/objects.php

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
require_once __DIR__.'/../lib/Ladybug.php';
4+
5+
// user class
6+
7+
class Foo {
8+
public $bar = 1;
9+
public $bar2 = 2;
10+
11+
public function __construct() {}
12+
public function getBar() { return $this->bar; }
13+
public function setBar($bar) { $this->bar = $bar; }
14+
}
15+
16+
$foo = new Foo();
17+
ladybug_dump($foo);
18+
19+
// DateTime object
20+
21+
$date = new DateTime();
22+
ladybug_dump($date);
23+
24+
25+
$sXml = <<<XML
26+
<books>
27+
<book id="1">
28+
<title>PHP 5 Power Programming</title>
29+
<author>Andi Gutmans, Stig Bakken, Derick Rethans</author>
30+
</book>
31+
<book id="2">
32+
<title>Clean Code: A Handbook of Agile Software Craftsmanship</title>
33+
<author>Robert C. Martin</author>
34+
</book>
35+
</books>
36+
XML;
37+
$dom = new DOMDocument();
38+
$dom->loadXml($sXml);
39+
40+
ladybug_dump($dom);

examples/resources.php

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
require_once __DIR__.'/../lib/Ladybug.php';
4+
5+
$file = fopen(__DIR__ . '/../LICENSE', 'r');
6+
ladybug_dump($file);

examples/simple_variables.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
require_once __DIR__.'/../lib/Ladybug.php';
4+
5+
$var1 = NULL;
6+
$var2 = 15;
7+
$var3 = 15.5;
8+
$var4 = 'hello world!';
9+
$var5 = false;
10+
11+
ladybug_dump($var1, $var2, $var3, $var4, $var5);

0 commit comments

Comments
 (0)