Skip to content

segfault on soap server handler when it contains undefined constant #23447

Closed

Description

@lmaltsis

Description

The following code:

<?php
class foo { private $broken = undefinedConstant; }
$server = new SoapServer(null, array('uri' => ''));
$server->setClass('foo');
$server->handle(<<<'XML'
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body><anything/></SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML);

Resulted in this output:

Segmentation fault (core dumped)

But I expected this output instead:
undefined constant error

PHP Version

PHP 8.5.9 (cli) (built: Aug  7 2026 18:15:17) (NTS DEBUG)
Copyright (c) The PHP Group
Zend Engine v4.5.9, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.9, Copyright (c), by Zend Technologies

Operating System

Ubuntu 24.04

Activity

  1. lmaltsis commented on Aug 25, 2026

    @lmaltsis
    Author

    also triggers on latest trunk

  2. added a commit that references this issue on Aug 25, 2026
  3. added 3 commits that reference this issue on Aug 30, 2026
    8dafaf5
    89c7271
    efc4cd2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions