Skip to content

Instantly share code, notes, and snippets.

@tommcfarlin
Last active August 16, 2018 15:18
Show Gist options
  • Save tommcfarlin/426e02bcfc411d43be6715b3e84ead7e to your computer and use it in GitHub Desktop.
Save tommcfarlin/426e02bcfc411d43be6715b3e84ead7e to your computer and use it in GitHub Desktop.
The Independent WordPress Developer. Resources, Code, Commands, and More
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install php
$ brew install composer
$ composer global require laravel/valet
$ ping testDomain.test
$ brew install mysql
<?php
define( 'WP_DEBUG', false );
<?php
define( 'WP_DEBUG', true );
<?php
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
@ini_set( 'display_errors', 1 );
define( 'SCRIPT_DEBUG', true );
define( 'SAVEQUERIES', true );
[05-Jul-2018 19:43:53 UTC] PHP Fatal error: Uncaught Error: Class 'EasyEmailExport\Admin\EmailExportSubmenu' not found in /Users/tommcfarlin/Dropbox/Projects/trunk/wp-content/plugins/easy-email-export/easy-email-export.php:37
#8 /U in /Users/tommcfarlin/Dropbox/Projects/trunk/wp-content/plugins/easy-email-export/easy-email-export.php on line 37
[05-Jul-2018 19:44:03 UTC] PHP Warning: include_once(./src/Admin/EmailExportSubmenu.php): failed to open stream: No such file or directory in /Users/tommcfarlin/Dropbox/Projects/trunk/wp-content/plugins/easy-email-export/easy-email-export.php on line 25
[05-Jul-2018 19:44:03 UTC] PHP Warning: include_once(): Failed opening './src/Admin/EmailExportSubmenu.php' for inclusion (include_path='.:/usr/local/Cellar/php/7.2.5/share/php/pear') in /Users/tommcfarlin/Dropbox/Projects/trunk/wp-content/plugins/easy-email-export/easy-email-export.php on line 25
<?php
error_log(print_r($exampleArray, true));
<?php
/**
* Starts all of the objects stored is the registry by calling
* the `start` method that's available on each of the objects.
*/
public function start()
{
foreach ($this->storage as $obj) {
$obj->start();
}
}
<?php
/**
* Starts all of the objects stored is the registry by calling
* the `start` method that's available on each of the objects.
*/
public function start()
{
foreach ($this->storage as $obj) {
error_log(print_r($obj, true));
$obj->start();
}
}
$ pecl install xdebug
zend_extension="/usr/local/lib/php/pecl/20160303/xdebug.so"
[XDebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
<?php
// First, set a sample name.
$exampleName = 'alice';
echo $exampleName;
// Next, change the name and display it.
if ('alice' === $exampleName) {
$exampleName = 'bob';
}
echo $exampleName;
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment