{"id":1253,"date":"2012-11-26T16:36:19","date_gmt":"2012-11-26T16:36:19","guid":{"rendered":"http:\/\/leonardocotta.com.br\/blog\/?p=1253"},"modified":"2012-11-26T16:36:19","modified_gmt":"2012-11-26T16:36:19","slug":"php-5-4-novas-funcionalidades","status":"publish","type":"post","link":"https:\/\/leonardocotta.com.br\/?p=1253","title":{"rendered":"PHP 5.4 novas funcionalidades"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h4>PHP 5.4 novas funcionalidades<\/h4>\n<h4>Seguran\u00e7a e Performance<\/h4>\n<p>Como toda nova vers\u00e3o do PHP, esta vers\u00e3o traz algumas melhorias significativas \u00e0 seguran\u00e7a e performance do seu sistema vejamos algumas delas:<\/p>\n<h2>Traits<\/h2>\n<p>Traits s\u00e3o mecanismos que vieram para melhorar a\u00a0<strong>reutiliza\u00e7\u00e3o de c\u00f3digo<\/strong>, e servem perfeitamente para resolver o problema da falta de\u00a0<strong>heran\u00e7a m\u00faltipla<\/strong>.<\/p>\n<p>Para mais informa\u00e7\u00f5es entre no manual e veja\u00a0<a href=\"http:\/\/php.net\/manual\/en\/language.oop5.traits.php\">http:\/\/php.net\/manual\/en\/language.oop5.traits.php<\/a><\/p>\n<h2>Nova sintaxe para arrays<\/h2>\n<p>Antigamente voc\u00ea criava arrays assim:<\/p>\n<div id=\"gist-3970221\">\n<div>\n<div>\n<div>\n<div><em><code>$nomes = array('Leonardo', 'Fulano', 'Ciclano');<\/code><\/em><\/div>\n<div><em><code>$idades = array('Leonardo' =&gt; 23, 'Fulano' =&gt; 18, 'Ciclano' =&gt; 35);<\/code><\/em><\/div>\n<div><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Agora voc\u00ea pode cri\u00e1-los com uma sintaxe bem mais limpa:<\/p>\n<div>\n<div><em><code>$nomes = ['Leonardo', 'Fulano', 'Ciclano'];<\/code><\/em><\/div>\n<div><em>$idades = [&#8216;Leonardo&#8217; =&gt; 23, &#8216;Fulano&#8217; =&gt; 18, &#8216;Ciclano&#8217; =&gt; 35];<\/em><\/div>\n<div><\/div>\n<\/div>\n<p>Simples pra quem v\u00ea mas util pra quem usa. Fino n\u00e9, legal, para verem mais consultem tamb\u00e9m o manual do Php! Nele garanto que ver\u00e3o muito mais do que simples mudan\u00e7as, bacana pra quem quer se atualizar.<\/p>\n<p><a href=\"http:\/\/www.php.net\/manual\/pt_BR\/\">http:\/\/www.php.net\/manual\/pt_BR\/<\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>Notem que tiveram v\u00e1rias mudan\u00e7as e algumas fun\u00e7\u00f5es do php foram removidas!<\/h2>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.php.net\/ChangeLog-5.php#5.4.0\">http:\/\/www.php.net\/ChangeLog-5.php#5.4.0<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; PHP 5.4 novas funcionalidades Seguran\u00e7a e Performance Como toda nova vers\u00e3o do PHP, esta vers\u00e3o traz algumas melhorias significativas \u00e0 seguran\u00e7a e performance do seu sistema vejamos algumas delas: Traits Traits s\u00e3o mecanismos que vieram para melhorar a\u00a0reutiliza\u00e7\u00e3o de c\u00f3digo, e servem perfeitamente para resolver o problema da falta de\u00a0heran\u00e7a m\u00faltipla. Para mais informa\u00e7\u00f5es &hellip; <a href=\"https:\/\/leonardocotta.com.br\/?p=1253\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">PHP 5.4 novas funcionalidades<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[50],"tags":[73,208,235,265],"class_list":["post-1253","post","type-post","status-publish","format-standard","hentry","category-php","tag-arrays","tag-php-5-4","tag-seguranca","tag-traits"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/leonardocotta.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/leonardocotta.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/leonardocotta.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/leonardocotta.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/leonardocotta.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1253"}],"version-history":[{"count":0,"href":"https:\/\/leonardocotta.com.br\/index.php?rest_route=\/wp\/v2\/posts\/1253\/revisions"}],"wp:attachment":[{"href":"https:\/\/leonardocotta.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/leonardocotta.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/leonardocotta.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}