note 104815 deleted from language.oop5.decon by levim

From: Date: Tue, 18 Mar 2014 02:06:07 +0000
Subject: note 104815 deleted from language.oop5.decon by levim
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-198910@lists.php.net to get a copy of this message
Note Submitter: misha at gmail dot com ---- This is kinda weird to me as it is not obvious behavior.... Initiating constructor having no arguments, using call with parameters will not throw error/warning. <?php class A { # no arguments constructor function __construct() { echo "WierdoO"; } } $param = 1; $a = new A( $param ); ?> // Output "WierdoO" Notice that this anomaly is observed only for No Argument Constructor case.

« previous php.notes (#198910) next »