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
<h1>Submit A Comment</h1> | |
<form method="post"> | |
<p>Name: <input name="name" /></p> | |
<p>Comment: <textarea name="comment"></textarea></p> | |
<input type="submit" /> | |
</form> | |
<?php | |
if($_POST) { |
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
foreach ($thing as $value) { | |
if(!empty($value)) { | |
if(is_array($value)) { | |
foreach($value as $subitem) { | |
$array[] = $subitem; | |
} | |
} else { | |
$array[] = $value; | |
} | |
} |
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 | |
$events[] = array( | |
"name" => "phpDay 2012", | |
"start_date" => "2012-05-18T00:00:00+02:00", | |
"end_date" => "2012-05-19T23:59:59+02:00", | |
"description" => "The GrUSP, the Italian PHP user group, organises the 8th phpDay, a conference dedicated to PHP for the enterprise.", | |
"href" => "http://www.phpday.it", | |
"hosts" => array( | |
"Daniel Londero", |
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
5.3.12 5.4.3 | |
Run 1 2.07883811 0.94130707 | |
Run 2 2.03927302 0.96553779 | |
Run 3 2.03478503 0.96503210 | |
Run 4 2.05938697 0.94606614 | |
Run 5 2.04912210 0.95049596 |
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 WeatherInterface { | |
public function getWeather(); | |
} | |
class WeatherBot implements WeatherInterface { | |
public function getWeather() { | |
// imagine something more complicated | |
return 'Sunny'; |
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
sudo http_proxy="http://wwwcache.lmu.ac.uk:3128" aptitude install curl | |
# add to .bashrc: | |
export http_proxy="http://wwwcache.lmu.ac.uk:3128" |
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
<form method="post"> | |
Name: <input type="text" name="name" /> | |
<br /> | |
<input type="submit" /> | |
</form> | |
<? | |
if($_POST) { | |
echo "Hello, " . filter_input(INPUT_POST, "name", FILTER_SANITIZE_STRING); |
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
Some lovely code, how nice! |
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 | |
// phpinfo(); | |
echo "verb: " . $_SERVER['REQUEST_METHOD'] . "\n"; | |
echo "headers:"; | |
var_dump(apache_request_headers()); | |
echo "\n"; |
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
Some riveting text |
OlderNewer