<?php
$pt = [',', 'janeiro', 'fevereiro', 'março', 'abril', 'maio', 'junho', 'julho', 'agosto', 'setembro', 'outubro', 'novembro', 'dezembro'];
$en = ['', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
$data = DateTime
::createFromFormat('d F Y', str_ireplace($pt, $en,'22 maio, 2018')); echo $data->format('Y-m-d') . PHP_EOL;
$data = DateTime
::createFromFormat('d F Y', str_ireplace($pt, $en,'30 março, 2018')); echo $data->format('Y-m-d');
PD9waHAKCiRwdCA9IFsnLCcsICdqYW5laXJvJywgJ2ZldmVyZWlybycsICdtYXLDp28nLCAnYWJyaWwnLCAnbWFpbycsICdqdW5obycsICdqdWxobycsICdhZ29zdG8nLCAnc2V0ZW1icm8nLCAnb3V0dWJybycsICdub3ZlbWJybycsICdkZXplbWJybyddOyAKJGVuID0gWycnLCAnSmFudWFyeScsICdGZWJydWFyeScsICdNYXJjaCcsICdBcHJpbCcsICdNYXknLCAnSnVuZScsICdKdWx5JywgJ0F1Z3VzdCcsICdTZXB0ZW1iZXInLCAnT2N0b2JlcicsICdOb3ZlbWJlcicsICdEZWNlbWJlciddOwoKCiRkYXRhID0gRGF0ZVRpbWU6OmNyZWF0ZUZyb21Gb3JtYXQoJ2QgRiBZJywgc3RyX2lyZXBsYWNlKCRwdCwgJGVuLCcyMiBtYWlvLCAyMDE4JykpOwplY2hvICRkYXRhLT5mb3JtYXQoJ1ktbS1kJykgLiBQSFBfRU9MOwoKCiRkYXRhID0gRGF0ZVRpbWU6OmNyZWF0ZUZyb21Gb3JtYXQoJ2QgRiBZJywgc3RyX2lyZXBsYWNlKCRwdCwgJGVuLCczMCBtYXLDp28sIDIwMTgnKSk7CmVjaG8gJGRhdGEtPmZvcm1hdCgnWS1tLWQnKTs=