|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-09-12 22:59 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2013-09-12 22:59 UTC] nikic@php.net
[2013-09-12 23:15 UTC] valentiny510 at yahoo dot es
[2013-10-13 01:23 UTC] valentiny510 at yahoo dot es
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 07:00:01 2025 UTC |
Description: ------------ When the class is instantiated with a variable is working like one espect... but the issue come when you want to miss the variable, because you don't use it or whatever reason.. Can be possible to act the same way both times ? Examples below.. Test script: --------------- <?php class Html { function __construct( ) { echo "Header\n"; } function __construct( ) { echo "\nFooter"; } } # without variable new Html; <p>Some html here...</p> # with $html var... $html = new Html; <p>Some html here...</p> Expected result: ---------------- Header Some html here... Footer Header Some html here... Footer Actual result: -------------- Header Footer <-- This is the problem... Some html here... Header Some html here... Footer