Intelephense squiggly line under function

Adding a missing function definition Using the VS Code Intelephense Extension. You get a squiggly line under a function you know exists. When you hover over it the popup says "Undefined function ... " Go to Preferences and Settings [ Ctrl + , ], search for stubs and...

How to enable ZipArchive on PHP 7.4

yum install php-zip # restart Apache or php-fpm This is on CentOS Linux release 7.7.1908 (Core) You will know you have it installed properly when you run the following code and it returns true <?php // enter this in a file such as phpzip.php...

Using a git repo as a composer repository

In CakePHP variable visibility is generally defined using this standard: public $defaultConfig; protected $_defaultConfig; private $__defaultConfig; Just had a situation where I had extended a class and one variable from the base class was marked as public. My VSCode...

PHP Version Gotcha

Just copied some code from a PHP 7.3+ development environment to the server running PHP 7.2 On the server I am getting this On PHP 7.3 it runs fine Because the line number is not listed this is how I find the problem Find which controller is being called when you see...

Netbeans Removes Indent from // Comments

Been using netbeans for PHP development and discovered that it will remove the leading whitespace from comments and then the comments inside a block of code are hard up against the left margin which looks weird. Not sure if there is a setting to stop this behaviour...

I have no idea what the problem is PHP CLI

Trying to do some PHP tutorials using vim and running php from the command line and I get.... nothing back. If it's a syntax error (e.g. a missing line ending ; ) then no reply at all. If the syntax is correct and it's something else then the error isn't displayed...

CakePHP 3 – Escape to the Global Namespace

This code in CakePHP 3: <?php $date = '31/01/1973'; $ymd = DateTime::createFromFormat('!d/m/Y', $date)->format('Y-m-d'); Causes this error Error: Class 'App\Controller\DateTime' not found This code fixes it: <?php $date = '31/01/1973'; $ymd =...

About the Author

James is an IT Professional based in Melbourne, Australia. He blogs about Information Technology, Open Source software, home renovations, good reads and travel.

Login

Blog History