-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed as not planned
Description
Description
The following code:
<?php
function processVar($var) {
if (is_object($var)) {
return (string)$var;
} elseif (is_array($var)) {
return implode(',', array_map('processVar', $var));
} else {
return $var;
}
}
function varFusion($var1, $var2, $var3) {
$vars = array($var1, $var2, $var3);
foreach ($vars as $i => $v1) {
foreach ($vars as $j => $v2) {
if ($i < $j) {
$result["concat_{$i}_{$j}"] = processVar($v1).''. processVar($v2);
}
}
}
return $result;
}
$xml = '<?xml version="1.0" encoding="utf-8"?>
<test>
</test>';
$root = simplexml_load_string($xml);
$clone = clone $root;
$script1_dataflow = $clone;
$script1_connect = $clone;
class foo {
public function __construct($n = 0) {
}
}
try {
$y = $script1_dataflow->__construct(1);
} catch (Exception $e) {
}
varFusion($script1_connect, $script2_connect, $random_var);
?>
Resulted in this output:
/home/dan/php-8.3.9/ext/simplexml/simplexml.c:1864:62: runtime error: member access within null pointer of type 'struct php_libxml_ref_obj'
But I expected this output instead:
PHP Version
8.3.9
Operating System
No response