|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-05-06 02:10 UTC] ryan dot brothers at gmail dot com
Description:
------------
The following code gives me a segmentation fault.
Test script:
---------------
<?php
class a
{
public $rows = array('names' => 0);
function test()
{
$index = 'names';
$amount = 1;
$this->rows[$index] += $amount;
}
}
$a = new a;
$a->test();
print_r($a->rows);
Expected result:
----------------
Array
(
[names] => 1
)
Actual result:
--------------
Segmentation fault.
Program received signal SIGSEGV, Segmentation fault.
0x00007fffe8ee86f6 in _php_operator_binary_assign_op (execute_data=0x7ffff7f90220,
methodname=0x7fffe8eef922 "__assign_add", methodname_len=12)
at /opt/src/operator-0.4.1/operator.c:422
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 00:00:02 2025 UTC |
Program received signal SIGSEGV, Segmentation fault. 0x00007fffe8ee86f6 in _php_operator_binary_assign_op (execute_data=0x7ffff7f90220, methodname=0x7fffe8eef922 "__assign_add", methodname_len=12) at /home/ryan/src/operator-0.4.1/operator.c:422 422 if (!object || Z_TYPE_P(object) != IS_OBJECT) {