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 | |
//---TEST1---------------------------------------------------- | |
function objectTest(stdClass $input) { | |
$input->name = "Sally"; | |
} | |
$object = new stdClass; | |
$object->name = "Bob"; | |
$object->address = "1 Test Street"; | |
objectTest($object); | |
echo $object->name; //Sally |
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
#!/bin/bash | |
# This script makes Netbeans use a custom phpcs.xml (PHP Codesniffer) | |
# Note: git dir does not work (NB runs out of the git dir) | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
# When asked for the standards, return them | |
# note: The last file is our standard! | |
if [ $1 = '-i' ]; then |
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 apt-get install \ | |
gparted \ | |
gedit \ | |
apache2 \ | |
libapache2-mpm-itk \ | |
php5 \ | |
php5-xdebug \ | |
php5-xsl \ | |
php5-mcrypt \ | |
php5-curl \ |
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
vhost disable asset cacheing | |
<Directory .../public_html> | |
#disable caching | |
Header unset ETag | |
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" | |
Header set Pragma "no-cache" | |
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT" | |
</Directory> |
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 | |
$value = "some\"string'™"; | |
?> | |
<form name="test" action="<?php echo time(); ?>" method="POST"> | |
<input type="text" value="<?php echo htmlentities($value, ENT_QUOTES, 'UTF-8'); ?>" name="test"> | |
<input type="submit" value="go" name="go" /> | |
</form> | |
<br/> | |
<br/> |
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 | |
class ModelA{ | |
public function sayHi() { return "hi"; } | |
} | |
class ModelB extends ModelA { | |
public function sayHi() { return "hello"; } | |
} | |
class SomethingA{ |
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
zend_extension=xdebug.so | |
xdebug.remote_host=127.0.0.1 | |
xdebug.remote_enable=1 | |
xdebug.remote_port=9000 | |
xdebug.remote_handler=dbgp | |
xdebug.remote_mode=req | |
xdebug.idekey=netbeans-xdebug | |
xdebug.remote_autostart=1 |
NewerOlder