【PHP中__debugInfo()魔术方法详解】教程文章相关的互联网学习教程文章

php – 为什么PDO debugDumpParams截断查询【代码】

我发现了同样的问题here,但没有答案,我在这里提供了更简单的例子,并再试一次…… 码:<?php $dbh = new PDO('mysql:dbname=test;host=127.0.0.1', 'root'); $sth = $dbh->prepare("SELECT 'Dumps the informations contained by a prepared statement directly on the output. It will provide the SQL query in use, the number of parameters used (Params), the list of parameters, with their name, type (paramtype) as an i...

php – Docker和XDebug没有读取断点VSCode【代码】

在过去的6个月中,我一直在使用XDebug和PHP Version 7.0.*在远程调试Docker容器的MAC上. 我正在运行一个旧版本的docker,它使用VirtualBox到VM for docker,一切正常. 我最近更新了docker到版本17.03.1并且除了xDebug之外什么都没有.我通过他的存储库上的一个问题联系了vscode-php-debug的创建者,然后他指出我用xdebug和/或docker来解决这个问题. 我的问题如下: XDebug正在运行并处理我的容器,xdebug日志显示它连接到我的IDE,但它只是...

加载xdebug时,CakePHP命令行不起作用【代码】

我正在尝试使用xdebug对PHP 7.1.6来解决我的CakePHP v3.3.6项目中的失败单元测试问题.我使用以下设置设置了xdebug:[xdebug] xdebug.remote_enable = on xdebug.remote_host = 127.0.0.1 xdebug.remote_port = 9000 xdebug.remote_autostart = 1 xdebug.profiler_enable = off xdebug.profiler_enable_trigger = off xdebug.profiler_output_name = cachegrind.out.%t.%p xdebug.profiler_output_dir = "c:/wamp/tmp" xdebug.show_...

除非我禁用监听按钮,否则不会触发带有PhpStorm断点的PHPUnit Xdebug【代码】

我有一个非常奇怪的情况,PhpStorm似乎没有抓住我的断点,除非我启用了监听按钮启动测试,然后启动后,我然后禁用按钮. 请参阅下面的屏幕截图和配置文件. 关于我可能配置错误的任何想法? 这是PhpStorm在“挂起”时在控制台中显示的内容 – Testing started at 12:57 PM ... /usr/local/bin/php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9009 -dxdebug.remote_host=127.0.0.1 /private/var/folders/k7...

带有PhpStorm IDE的Xdebug – 检测传入连接但不会启动调试控制台【代码】

我试图用PhpStorm 7.0设置Xdebug(2.2.3),我不能像过去那样调出逐步调试控制台.我用来设置它的指南是: > https://www.jetbrains.com/phpstorm/webhelp/configuring-xdebug.html> http://blog.jetbrains.com/webide/2011/02/zero-configuration-debugging-with-xdebug-and-phpstorm-2-0/ 我知道Xdebug扩展本身正在工作,因为在页面加载时正在创建cachegrind.out.3280文件(所需的所有脚本和变量/值都需要12Mb).我在php.ini(php版本5.4...

php – Symfony Doctrine事件订阅者未在debug:event-dispatcher中列出【代码】

Symfony v3.3.4, Doctrine ORM v2.5.6我为一个学说实体创建了一个事件订阅者:AppBundle\EventListener\LivreSubscriber:tags:- { name: doctrine.event_subscriber }它工作正常!但是很长一段时间我认为它没有用,因为监听器没有在debug:event-dispatcher命令中列出:$docker-compose exec phpapp bin/console debug:event-dispatcher doctrine.event_subscriber[WARNING] The event "doctrine.event_subscriber" does not have a...

PHPUNIT xdebug codecoverage无法在控制台(mac)MAMP 1.9 PRO中工作【代码】

嗨,我的PHPdeit的xdebug连接有问题. 在跑步时:phpunit --coverage-html ./report unit我得到:PHPUnit 3.4.15 by Sebastian Bergmann.The Xdebug extension is not loaded.当我运行PHP -vPHP 5.2.13 (cli) (built: Mar 5 2010 16:23:44) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologieswith eAccelerator v0.9.6, Copyright (c) 2004-2010 eAccelerator, by eAccelerato...

php – XDebug与Geany?

是否可以使用Geany配置PHP XDebug? XDebug如:http://xdebug.org/和Geany一样:http://www.geany.org/ 如果有可能,怎么办呢?解决方法:不是现在. 它已经在Geany plugin wishlist已经有一段时间了,所以有一天会发生这种情况. 相反,您可以使用xdebug插件用于Eclipse和其他一些,列于here.

Xdebug和PHP无法在我的服务器上运行【代码】

我已经在传递过的时候多次配置了xdebug和php,但是回过头来看我的旧笔记,却无法帮助我重新配置它. 我做了以下事情: >安装灯泡>安装php5-xdebug>重启apache sudo /etc/init.d/apache2 restart> /etc/php5/apache2/conf.d/xdebug.ini现在看起来像这样: xdebug.inizend_extension=/usr/lib/php5/20090626+lfs/xdebug.so xdebug.remote_enable=On xdebug.remote_enable=1 xdebug.remote_host="localhost" xdebug.remote_port=9000 xde...

phpstorm2018 基于phpstudy安装xdebug

内容转载自:https://blog.csdn.net/sjt223857130/article/details/83038514(安装xdebug) https://blog.csdn.net/u011242029/article/details/81125287 (设置自动命名空间)

PHP有一个可以在代码中使用的DEBUG符号吗?【代码】

像C语言甚至C#(技术上没有预处理器)这样的语言允许你编写如下代码:#DEFINE DEBUG ...string returnedStr = this.SomeFoo(); #if DEBUGDebug.WriteLine("returned string =" + returnedStr); #endif这是我喜欢在我的代码中使用脚手架的形式,我想知道PHP是否有这样的东西.我确信我可以使用变量来模拟这个,但我想大多数情况下解释PHP的事实并不容易在执行时自动删除/删除调试代码(因为它不需要).解决方法:PHP没有这样的东西.但是你肯...

php – Netbeans Xdebug Vagrant连接超时【代码】

我正在尝试让xdebug为PHP工作,Netbeans连接到Vagrant配置的VM(如果重要,请使用PuPHPet进行设置) 我的VM上有这些php.ini设置:[XDEBUG] xdebug.remote_connect_back=1 xdebug.default_enable=1 xdebug.remote_autostart=0 xdebug.max_nesting_level=256 xdebug.remote_enable=1 xdebug.remote_log=/tmp/php5-xdebug.log xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.idekey=netbeans-xdebugNetbeans的路径映射正确,并...

php – 我在Yii2中将全局变量放在哪里类似于YII_DEBUG和YII_ENV【代码】

我正在建立一个名为“市场”的“子域名”网站.所以网址将是marketplace.sample.com.我正在使用Yii2高级应用程序,我将以下代码添加到位于前端/ web的index.php中.defined('MARKETPLACE') or define('MARKETPLACE', preg_match('/^marketplace/', $_SERVER['HTTP_HOST']) === 1 ? true : false);这适用于我的环境,但是,我刚刚意识到index.php文件位于Yii2中的.gitignore文件中,因为该文件是由init脚本创建的,因此对它的更改将通过运行...

php类知识---魔术方法__toString,__call,__debugInfo【代码】

<?phpclass mycoach{ public function __construct($name,$age) { $this->name = $name; $this->age = $age; echo "upon melancholy hill"."\n"; } public function __toString() { #echo时触发,返回一个字符串 return "working hard and party with cpc and cj"."\n"; } public function __debugInfo() { #一个诡异的方法,解析一个并不存在的函数,以及它其...

php – Xdebug vs xhprof

我正在使用xdebug在我的PHP代码中分析多卷曲的使用,并且数字没有加总,所以我使用xhprof代替,这似乎提供了更好的数据.为什么xdebug提供看似糟糕的分析信息,有没有办法解决它?我更喜欢使用xdebug的分析器,因为它有更多的工具.解决方法:Xdebug的分析器以稍微不同的方式工作,从而产生不同的结果. (我也知道聚合数据存在一些小问题).我总是建议使用Xdebug和XHprof.