<?php
$subject = "casa, castanha, carpinteiro, cana de açucar, cama, casar, cavalo.";
$pattern = "/ca.a/";
# Executa nossa expressão
if ($resultado >= 1) {
print "casou \n";
} else if ($resultado === 0) {
print "não casou \n";
} elseif ($resultado === false) {
print "ocorreu um erro";
}
PD9waHAKCiRzdWJqZWN0ID0gImNhc2EsIGNhc3RhbmhhLCBjYXJwaW50ZWlybywgY2FuYSBkZSBhw6d1Y2FyLCBjYW1hLCBjYXNhciwgY2F2YWxvLiI7CiRwYXR0ZXJuID0gIi9jYS5hLyI7CiRtYXRjaGVzID0gYXJyYXkoKTsKCiMgRXhlY3V0YSBub3NzYSBleHByZXNzw6NvCiRyZXN1bHRhZG8gPSBwcmVnX21hdGNoX2FsbCgkcGF0dGVybiwgJHN1YmplY3QsICRtYXRjaGVzKTsKCmlmICgkcmVzdWx0YWRvID49IDEpIHsKICAgIHByaW50ICJjYXNvdSBcbiI7CiAgICB2YXJfZHVtcCgkbWF0Y2hlcyk7Cgp9IGVsc2UgaWYgKCRyZXN1bHRhZG8gPT09IDApIHsKICAgIHByaW50ICJuw6NvIGNhc291IFxuIjsKICAgIHZhcl9kdW1wKCRtYXRjaGVzKTsKCn0gZWxzZWlmICgkcmVzdWx0YWRvID09PSBmYWxzZSkgewogICAgcHJpbnQgIm9jb3JyZXUgdW0gZXJybyI7Cgp9