php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43044 Something is wrong with the pseudo-objects
Submitted: 2007-10-19 18:53 UTC Modified: 2007-10-19 19:12 UTC
From: programatorfreez at gmail dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.4 OS: Gentoo GNU/Linux
Private report: No CVE-ID: None
 [2007-10-19 18:53 UTC] programatorfreez at gmail dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-19 19:12 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Your\'e having an infinite recursion
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 02:01:29 2024 UTC