<?php
$dia="-01";
$mes1 = "2018/02".$dia;
$mes2 = "2018/03".$dia;
if($mes1 > $mes2) {
echo "Mês 1 é maior que mês 2";
}elseif($mes2 > $mes1) {
echo "Mês 2 é maior que mês 1";
}
PD9waHAKCgokZGlhPSItMDEiOwoKJG1lczEgPSAiMjAxOC8wMiIuJGRpYTsKJG1lczIgPSAiMjAxOC8wMyIuJGRpYTsKCgokbWVzMSA9IHN0cnRvdGltZShzdHJfcmVwbGFjZSgnLycsICctJywgJG1lczEpKTsKCQkJCSAgCiRtZXMyID0gc3RydG90aW1lKHN0cl9yZXBsYWNlKCcvJywgJy0nLCAkbWVzMikpOwoKCgppZigkbWVzMSA+ICRtZXMyKSB7CgogICAgZWNobyAiTcOqcyAxIMOpIG1haW9yIHF1ZSBtw6pzIDIiOwoKfWVsc2VpZigkbWVzMiA+ICRtZXMxKSB7CgogICAgZWNobyAiTcOqcyAyIMOpIG1haW9yIHF1ZSBtw6pzIDEiOwoKfQ==