I've a object called 'Booking' with about 13 properties however while attempting to run the following code.
$bookingDateTime = date('Y-m-d H:i:s');
$booking = new Booking(....,$bookingDateTime);
echo "START OF TEST <br>";
echo "$bookingDateTime <br>";
echo "$booking->bookingDateTime <br>";
echo "END OF TEST <br>";
It always echoes without the second DateTime.
START OF TEST
2018-08-07 04:38:27
END OF TEST
I am unsure what am i missing or is DateTime objects not allowed in PHP Objects?
Within Booking Object is the following
Class Booking{
public $bookingDateTime;
function __construct($bookingDateTime){
$this->$bookingDateTime = $bookingDateTime;
}
}
$bookingDateTimeconstructor argument in the constructor?