Edit report at https://bugs.php.net/bug.php?id=61925&edit=1
ID: 61925 Updated by: re...@php.net Reported by: alex dot erwin at dilithiumtoys dot com Summary: Crashes on using variable equal to conditional shortcut -Status: Open +Status: Feedback Type: Bug Package: *Programming Data Structures Operating System: Windows 7 32-bit PHP Version: 5.4.1 Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Could you please try lastest version. I can't reproduce it. http://3v4l.org/to5RB Previous Comments: ------------------------------------------------------------------------ [2012-05-03 16:12:59] alex dot erwin at dilithiumtoys dot com Description: ------------ I am using Apache 2.4 with PHP 5.4 on Windows 7 32bit. When executing the code shown, from within a private class method, the server crashes. PHP is compiled as a DSO. If the code is changed to utilize long form conditional processing the execution works. If I use the command line to execute the script, the class loaded by require does not get called. // my index.php require("C:/Infinity/application/shared/classes/a.php"); $x = new a(); // my a.php class a { __constructor(){ $this->import_variables($_POST); }} further code in test script. Test script: --------------- # retrieve caller name $calledby = debug_backtrace(); print_r($calledby); // does not work $caller = (strlen($calledby[1]['class'])) ? $calledby[1]['class'] : $calledby[0]['class']; // works and does does not segfault if (strlen($calledby[1]['class'])) $caller = $calledby[1]['class']; else $caller = $calledby[0]['class']; # arguments are required if (!func_num_args()) { return; } # fill variables with argument contents if exists $variables = (func_num_args() == 0) ? NULL : (is_array(func_get_arg(0)) ? func_get_arg(0) : NULL); Expected result: ---------------- I expect that Apache will not SEGFAULT ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61925&edit=1