|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-10-19 19:12 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 09 05:00:01 2025 UTC |
Description: ------------ Something is wrong Reproduce code: --------------- <?php error_reporting(E_ALL); ini_set('display_errors', 'on'); ini_set('ignore_repeated_errors', 'off'); //defined('IS_USER') or die('Do not try to hack.'); class phpIsFuckingShit { var $input; function __construct() { $input = new phpIsFuckingShit(); } } class input { var $text; function __construct() { $text = new inputText(); } } class inputText { private $caption; function caption($arg = null) { if (null === $caption) { return $this->caption; } else { $this->caption = $arg; } } } $itIsSenseLessPseudoLanguage = new phpIsFuckingShit; $itIsSenseLessPseudoLanguage->input->text->caption('Hello world'); $why = $itIsSenseLessPseudoLanguage->input->text->caption(); echo "'" . $why . "'"; ?> Expected result: ---------------- 'Hello world' Actual result: -------------- SEGFAULT