如何建立PHP偵錯環境3

下載並安裝 XAMPP phpinfo() 下載並安裝 Visual Studio Code 延伸模組 PHP Debug 設定 (注意JSON特殊字元){ "php.validate.executablePath": "C:/xampp/php/php.exe", "php.debug.executablePath": "C:/xampp/php/php.exe" } 下載 XDebug PHP Version 8.1.6 = PHP 8.1 Architecture x64 = 64 bit x86 = 32 bit Thread Safety enabled disabled 設定 XDebug C:\xampp\php\php.inizend_extension="C:\xampp\php\ext\php_xdebug-3.1.4-8.1-vs16-x86_64.dll" xdebug.mode = debug xdebug.start_with_request = yes C:\xampp\htdocs menu.php

如何建立PHP偵錯環境(以XAMPP與VS Code為例)

檢查變數型別 //宣告方式const //constant(常數),宣告後,值不能改變var //variable(變數),宣告後,值可以變更let //variable(變數),宣告後,值可以變更(ES6後,建議使用) //基本型別:number、string、boolean、null、undefined//物件型別:object、function typeof 3.14159 //numbertypeof "flystudiox" //stringtypeof true //booleantypeof {} //objecttypeof [] //objecttypeof null //objecttypeof undefined //undefinedtypeof alert //functiontypeof NaN //number</code></pre> 下載並安裝 XAMPP phpinfo() 下載並安裝 Visual Studio Code 延伸模組 PHP Debug 設定 (注意JSON特殊字元) { "php.validate.executablePath": "C:/xampp/php/php.exe", "php.debug.executablePath": "C:/xampp/php/php.exe" } 下載 XDebug PHP Version 8.1.6 = PHP...