User Tools

Site Tools


php

This is an old revision of the document!


XDebug

zend_extension="D:\phpStudy\php\php-5.6.27-nts\ext\php_xdebug.dll"
xdebug.profiler_enable = 1
xdebug.collect_params=4
xdebug.collect_return=1
xdebug.auto_trace=1
xdebug.profiler_output_name = "cachegrind.out.%t.%p"
xdebug.remote_enable = 1

xdebug.remote_handler = "dbgp"
xdebug.idekey = PHPSTORM
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9000

``` $ ./php -v PHP 5.6.33 (cli) (built: Jan 16 2018 14:25:50) Copyright © 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright © 1998-2016 Zend Technologies

  with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans

./php –ini

$ cat «EOF > `./php –ini | grep -ohP “\s*\K/.*php\.ini$”`

[XDebug] zend_extension=“/path/to/xdebug.so” xdebug.remote_enable=on xdebug.remote_connect_back=on EOF

https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc

```

Visual Studio Code

install `PHP Debug`, add field to `launch.json` of `Listen for XDebug`:

  {
    "name": "Listen for XDebug",
    "type": "php",
    "request": "launch",
    "port": 9000,
    "stopOnEntry": true
  }

phpbrew

``` phpbrew init phpbrew known phpbrew install -j 3 7.1.21 +default+mysql+pdo+fpm+gd phpbrew use … #for some distros, gd may not be compiled, use: phpbrew ext install gd ```

composer

``` composer config -g repo.packagist composer https://packagist.laravel-china.org ```

php.1537837747.txt.gz · Last modified: by fe80:13d4:6f1f:46be:b875:3e1c:30e7:5797

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki