Derk created NETBEANS-587:
-----------------------------
Summary: Netbeans php debugger crash
Key: NETBEANS-587
URL: https://issues.apache.org/jira/browse/NETBEANS-587
Project: NetBeans
Issue Type: Bug
Environment: Linux Ubuntu 16.04LTS
php --version: PHP 7.0.28-0ubuntu0.16.04.1 (cli) ( NTS )
Netbeans 8.2
Reporter: Derk
Attachments: bug.tgz
How to reproduce:
Take the files from the attachment and load the project in netbeans.
Put a breakpoint on the last line (the "echo $var;" line)
Click the "Debug Project" button in netbeans
I run this script from the command line like so:
{code:java}
export XDEBUG_CONFIG="idekey=netbeans-xdebug"
php -d xdebug.remote_enable=1 index.php
{code}
Press the green "play" button.
Actual output "Socket Exception occured"
Expected output: not to get this error but to have normal debugging output.
Actual output in the console: Segmentation fault (core dumped)
Expected output in the console: "1"
Now look at line 3. Remove the & in front of $var to make the line look like
this:
{code:java}
$anon_function = function() use ($var)
{code}
Try this how to reproduce again.
Actual output: no error, everything works fine.
Actual output in the console: "0"
If you can't get the attachment from this issue:
Create a new netbeans php project (I choose "php project with existing
sources").
Have this php script as index.php:
{code:java}
<?php
$var = 0;
$anon_function = function() use (&$var)
{
$var++;
};
$anon_function();
echo $var;
{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists