PHP

Articles
Resources

https://github.com/Dickurt/vscode-php-formatter/wiki
https://github.com/Dickurt/vscode-php-formatter/wiki/Configuration
https://marketplace.visualstudio.com/items?itemName=Sophisticode.php-formatter

Syntax Check
Limits
Predefined global variables
Configuration
Static code analysis
Data types
Float
Boolean
Integer
String
Function
Miscellaneous
CURL

Laravel

Files - Working with files
Excel
PDF
Access - Working with Access database
Arrays
Archives - Working with archive (zip, tar) files
Images - Working images
JSON
Charts
CAPTCHA
Functions

Quality assurance / Unit testing
Code coverage
Code quality
Validation
Logging
try-catch
Debugging
Debuggers
Gotchas

Dependency injection
Design patterns
Asset management
Automation
Books
Conferences
Composer
Continuous integration
CSS Preprocessors
Database versioning
Database
Sourcehunt
Editors
IDEs
Extension development
Features
Face detection
Filters
Geolocation
i18n
MVC Frameworks
Mongodb
MySQL
Vagrant

OOP
Package managers
Performance
Phing
phpdoc
Prediction
RabbitMQ
Redis
Regular expression
REST
Security
SOAP
Style Guide
Template engines
Underscore
Windows
Word

My FAQs
Socket Programming
Compile PayflowPro
old

error_log( print_r( $object, true ) );

function var_error_log( $object=null ){
    ob_start();                    // start buffer capture
    var_dump( $object );           // dump the values
    $contents = ob_get_contents(); // put the buffer into a variable
    ob_end_clean();                // end capture
    error_log( $contents );        // log contents of the result of var_dump( $object )
}
<?php if (condition)) { ?>
    <!-- HTML content to be displayed if the condition is true -->
<?php } else { ?>
    <!-- HTML content to be displayed if the condition is false -->
<?php } ?>

<?php if (condition)): ?>
    <!-- HTML content to be displayed if the condition is true -->
<?php else: ?>
    <!-- HTML content to be displayed if the condition is false -->
<?php endif; ?>
echo (date("l, F dS Y."));
echo "This a <b>Test</b>!";
<?php
    $srcurl = "http://localhost/index.php";
    $tempfilename = "tempindex.html";
    $targetfilename = "index.html";
?>
<html><head><title>...</title></head>
<body>Generating <?php echo("$targetfilename"); ?>
<?php
    @unlink($tempfilename);
    $dynpage = fopen($srcurl,'r');
    if (! $dynpage) {
        echo "Unable to load $srcurl static page.  Aborting.";
        exit();
    }
    $htmldate = fread($dynpage, 1024 x 1024);
    fclose($dynpage);
    $tempfile = fopen($tempfilename, 'w');
    fwrite($tempfile, $htmldata);
    fclose($tempfile);
    $ok = copy($tempfilename, $targetfilename);
    unlink($tempfilename);
?>
<p>Static page successfully updated.</p>
</body></html>

How can we test to see if a variable is set?

Use the isset function:

if (isset($variableName))

What is the purpose of the $PHP_SELF variable?

It refers to the URL of the current document.

What is the purpose of the htmlspecialchars function?

$text = htmlspecialchars("<HTML> can be dangerous.");

What is the purpose of the ereg function?

ereg("PHP", $text)

What is the purpose of the eregi function?

eregi("PHP", $text);
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License