this if condition throw "A non well formed numeric value encountered" message.
if(strtotime($from) + $conHour*60*60 == strtotime($to)){
}
The error I see is:
A non well formed numeric value encountered
****var_dump**
$from = string(19) "2019-04-15 16:05:00"
$to =string(19)"2019-04-15 17:05:00"
$conhour = string(5) "01:00"