{"id":5009,"date":"2019-06-18T11:37:36","date_gmt":"2019-06-18T11:37:36","guid":{"rendered":"https:\/\/www.icdsoft.com\/blog\/?p=5009"},"modified":"2025-08-12T06:05:11","modified_gmt":"2025-08-12T06:05:11","slug":"whats-new-in-php-7-3","status":"publish","type":"post","link":"https:\/\/www.icdsoft.com\/blog\/whats-new-in-php-7-3\/","title":{"rendered":"What&#8217;s New in PHP 7.3"},"content":{"rendered":"\n<p>PHP 7.3 is now available on all ICDSoft hosting servers. It is enabled by default for all new hosting accounts. If you are an existing customer, you can easily switch to the new version via the PHP Settings -&gt; Default PHP Interpreter section in the online Control Panel. With the addition of PHP 7.3, the total number of supported PHP versions on our servers is now five. Currently, we support the following versions:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>&nbsp;PHP 7.3<\/li><li>&nbsp;PHP 7.2<\/li><li>&nbsp;PHP 7.1<\/li><li>&nbsp;PHP 5.6<\/li><li>&nbsp;PHP 5.3<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"advgb-toc-2f40b1b1-4522-47bc-9126-48ad3b19a2dc\">Table of Contents<\/h2>\n\n\n\n<ul class=\"wp-block-advgb-summary advgb-toc alignnone\"><li class=\"toc-level-1\" style=\"margin-left:20px\"><a href=\"#advgb-toc-2f40b1b1-4522-47bc-9126-48ad3b19a2dc\">Table of Contents<\/a><\/li><li class=\"toc-level-1\" style=\"margin-left:20px\"><a href=\"#advgb-toc-15f88e33-2ed8-403c-9a03-9ed66e5ff431\">Change the PHP version of your hosting account<\/a><\/li><li class=\"toc-level-1\" style=\"margin-left:20px\"><a href=\"#advgb-toc-cd585b31-6175-44b7-8181-c14522823086\">PHP 7.3 release date<\/a><\/li><li class=\"toc-level-1\" style=\"margin-left:20px\"><a href=\"#advgb-toc-8a2d5d9b-4396-42b1-a74b-710f9f923d47\">PHP 7.3 changes<\/a><\/li><li class=\"toc-level-2\" style=\"margin-left:40px\"><a href=\"#advgb-toc-8a30a2f0-fa31-48cd-af28-a94a0fa7e26b\">Heredoc and Nowdoc changes<\/a><\/li><li class=\"toc-level-3\" style=\"margin-left:60px\"><a href=\"#advgb-toc-0ab25032-e17d-4699-8876-34641d1abdff\">Heredoc closing marker indentation<\/a><\/li><li class=\"toc-level-3\" style=\"margin-left:60px\"><a href=\"#advgb-toc-07ccc93c-af06-4d1b-9c4d-2063abe0a0ac\">Trailing marker new line removal<\/a><\/li><li class=\"toc-level-3\" style=\"margin-left:60px\"><a href=\"#advgb-toc-cb3d163c-35f9-4dc6-afe8-9d244c4e00e2\">Backwards compatibility impact<\/a><\/li><li class=\"toc-level-2\" style=\"margin-left:40px\"><a href=\"#advgb-toc-63a52d0b-5cde-4dd4-acbf-536b04d492fe\">Trailing coma in function calls<\/a><\/li><li class=\"toc-level-3\" style=\"margin-left:60px\"><a href=\"#advgb-toc-f4ddc572-f713-4427-9413-382fe4eba6c7\"> Backwards compatibility impact <\/a><\/li><li class=\"toc-level-1\" style=\"margin-left:20px\"><a href=\"#advgb-toc-d7ecf3d5-67a7-4377-b9a7-43822a53c871\">Deprecation and removal of case-Insensitive constants<\/a><\/li><li class=\"toc-level-3\" style=\"margin-left:60px\"><a href=\"#advgb-toc-648bdb0c-f56c-4390-a8d9-c889027e5994\">Backwards compatibility impact<\/a><\/li><li class=\"toc-level-1\" style=\"margin-left:20px\"><a href=\"#advgb-toc-2cc6065a-3c06-477a-b044-369a99416193\">PCRE upgrade<\/a><\/li><li class=\"toc-level-3\" style=\"margin-left:60px\"><a href=\"#advgb-toc-177c9dfb-ce8f-4452-9941-c586785bbc76\">Backwards compatibility impact<\/a><\/li><li class=\"toc-level-1\" style=\"margin-left:20px\"><a href=\"#advgb-toc-79421e85-cd91-4396-9edd-27ee5bf7989b\">Other changes<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"advgb-toc-15f88e33-2ed8-403c-9a03-9ed66e5ff431\">Change the PHP version of your hosting account<\/h2>\n\n\n\n<p>Changing PHP versions with ICDSoft's hosting plans is very easy. Click the image below to see a video on how to perform the change:<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><a href=\"https:\/\/www.icdsoft.com\/blog\/wp-content\/uploads\/2019\/06\/change_php.gif\"><img decoding=\"async\" data-src=\"https:\/\/www.icdsoft.com\/blog\/wp-content\/uploads\/2019\/06\/change_php-1024x732.gif\" alt=\"Web hosting control panel interface with account details, tools menu icons like File Manager, Backup, and WordPress options.\" class=\"wp-image-5018 lazyload\" width=\"768\" height=\"549\" data-srcset=\"https:\/\/www.icdsoft.com\/blog\/wp-content\/uploads\/2019\/06\/change_php-1024x732.gif 1024w, https:\/\/www.icdsoft.com\/blog\/wp-content\/uploads\/2019\/06\/change_php-300x214.gif 300w, https:\/\/www.icdsoft.com\/blog\/wp-content\/uploads\/2019\/06\/change_php-768x549.gif 768w\" data-sizes=\"(max-width: 768px) 100vw, 768px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 768px; --smush-placeholder-aspect-ratio: 768\/549;\" \/><\/a><\/figure>\n\n\n\n<p>We switched our own WordPress blog to PHP 7.3, and the execution time of the index.php script got 6% shorter than with PHP 7.2. For sites that are still running on PHP 5.6, the performance boost is even bigger (the script execution time could be cut in half).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"advgb-toc-cd585b31-6175-44b7-8181-c14522823086\">PHP 7.3 release date<\/h2>\n\n\n\n<p>PHP 7.3 was released in December 2018. The release announcement can be found here:  <a href=\"https:\/\/www.php.net\/releases\/7_3_0.php\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/www.php.net\/releases\/7_3_0.php<\/a> <\/p>\n\n\n\n<p>We considered adding it back then, but our experience shows that new PHP versions need some time to be adopted by the software community. WordPress core was fast to jump on the wagon, and PHP 7.3 has been listed as a recommended hosting platform for a few months already but, unfortunately, many plugins and themes weren't fully compatible with this version. If you are a developer of a WordPress plugin, or theme, you can check the following informational article on WordPress.org on PHP 7.3 compatibility:<\/p>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-make-wordpress-core\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"tPIV8bQJL0\"><a href=\"https:\/\/make.wordpress.org\/core\/2018\/10\/15\/wordpress-and-php-7-3\/\" target=\"_blank\" rel=\"noopener\">WordPress and PHP 7.3<\/a><\/blockquote><iframe title=\"&#8220;WordPress and PHP 7.3&#8221; &#8212; Make WordPress Core\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" src=\"https:\/\/make.wordpress.org\/core\/2018\/10\/15\/wordpress-and-php-7-3\/embed\/#?secret=tPIV8bQJL0\" data-secret=\"tPIV8bQJL0\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>If you are using a theme\/plugin that isn't fully compatible with PHP 7.3, you could send this article to the theme\/plugin developer. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"advgb-toc-8a2d5d9b-4396-42b1-a74b-710f9f923d47\">PHP 7.3 changes<\/h2>\n\n\n\n<p>While not a major upgrade like PHP 7.0, or even 7.2, PHP 7.3 comes with its set of deprecations and breaking changes. Here are the most important ones:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"advgb-toc-8a30a2f0-fa31-48cd-af28-a94a0fa7e26b\">Heredoc and Nowdoc changes<\/h3>\n\n\n\n<p>These are perhaps the most significant changes in PHP 7.3 - the way it handles heredoc and nowdoc has been improved and now provides additional flexibility.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advgb-toc-0ab25032-e17d-4699-8876-34641d1abdff\">Heredoc closing marker indentation<\/h4>\n\n\n\n<div class=\"wp-block-columns has-2-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong>Before PHP 7.3<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nclass foo {\n    public $bar = &lt;&lt;&lt;EOT\nbar\nEOT;\n}\n<\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong>PHP 7.3<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nclass foo {\n    public $bar = &lt;&lt;&lt;EOT\n        bar\n    EOT;\n}<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<p>In short, in PHP 7.3 you can now indent the closing marker (EOT;) and this sets the amount of whitespace that needs to be trimmed. Before PHP 7.3 indentation wasn't allowed and the new code would generate errors. You can check  <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/wiki.php.net\/rfc\/flexible_heredoc_nowdoc_syntaxes\" target=\"_blank\">https:\/\/wiki.php.net\/rfc\/flexible_heredoc_nowdoc_syntaxes<\/a>  for more information and examples.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advgb-toc-07ccc93c-af06-4d1b-9c4d-2063abe0a0ac\">Trailing marker new line removal<\/h4>\n\n\n\n<p>Before PHP 7.3 you were required to add a new line right after the closing marker. This requirement has now been removed. Here are two code examples to make this clearer:<\/p>\n\n\n\n<div class=\"wp-block-columns has-2-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong>Before PHP 7.3<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\nstringManipulator(&lt;&lt;&lt;END\n   a\n  b\n c\nEND\n);\n&nbsp;\n$values = [&lt;&lt;&lt;END\na\nb\nc\nEND\n, 'd e f'];<\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong>After PHP 7.3<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\nstringManipulator(&lt;&lt;&lt;END\n   a\n  b\n c\nEND);\n&nbsp;\n$values = [&lt;&lt;&lt;END\na\nb\nc\nEND, 'd e f'];<\/pre>\n<\/div>\n<\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advgb-toc-cb3d163c-35f9-4dc6-afe8-9d244c4e00e2\">Backwards compatibility impact<\/h4>\n\n\n\n<p>Small. The more flexible format now technically allows more collisions. <\/p>\n\n\n\n<p>Previous code will now throw errors if (and only if) the following conditions are met:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>the colliding marker begins at the start of a line in the text<\/li><li>the colliding marker can be seen as a standalone, valid symbol name<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"advgb-toc-63a52d0b-5cde-4dd4-acbf-536b04d492fe\">Trailing coma in function calls<\/h3>\n\n\n\n<p>is now allowed. This is mainly a code style improvement for those that are accustomed to adding a comma after every declaration. Here are some sample code snippets illustrating this change:<\/p>\n\n\n\n<div class=\"wp-block-columns has-2-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong>Before PHP 7.3<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\nfoo(\n    $foo,\n    $bar\n);<\/code><\/pre>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p><strong>After PHP 7.3<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>&lt;?php<br> foo(<br>     $foo,<br>     $bar,<br> );<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advgb-toc-f4ddc572-f713-4427-9413-382fe4eba6c7\"> Backwards compatibility impact <\/h4>\n\n\n\n<p>None. No existing code will be affected by this change.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"advgb-toc-d7ecf3d5-67a7-4377-b9a7-43822a53c871\">Deprecation and removal of case-Insensitive constants<\/h2>\n\n\n\n<p>Before PHP 7.3, you could declare case-insensitive constants by passing \"<strong>TRUE<\/strong>\" as the third parameter of define():<\/p>\n\n\n\n<p><code>define('Foo', 'Bar', true);<\/code><\/p>\n\n\n\n<p>This piece of code will throw the following error in PHP 7.3:<\/p>\n\n\n\n<p><code>Deprecated: Case-insensitive constants are deprecated. The correct casing for this constant is \"Foo\"<\/code><\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advgb-toc-648bdb0c-f56c-4390-a8d9-c889027e5994\">Backwards compatibility impact<\/h4>\n\n\n\n<p>Moderate. Existing code will need to be scanned and case-insensitive constants will need to be replaced. Since case-insensitive constants were an optional feature, it is likely that not many projects will be affected.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"advgb-toc-2cc6065a-3c06-477a-b044-369a99416193\">PCRE upgrade<\/h2>\n\n\n\n<p>The <em>Perl-Compatible Regular Expressions<\/em> (PCRE) extension has now been upgraded to PCRE2. PCRE2 is claimed to be backwards compatible with the old version, but there are some minor changes. PCRE2 has stricter validation of patterns, which means that some existing pattern matches may not compile now. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"advgb-toc-177c9dfb-ce8f-4452-9941-c586785bbc76\">Backwards compatibility impact<\/h4>\n\n\n\n<p>Moderate. Because of the more strict validation, some existing code may stop working. The debugging process may be detrimented, as you will not get an error - the regular expression may simply stop matching. Check the PHP Wiki for more information on the PCRE2 migration - <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/wiki.php.net\/rfc\/pcre2-migration\" target=\"_blank\">https:\/\/wiki.php.net\/rfc\/pcre2-migration<\/a>. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"advgb-toc-79421e85-cd91-4396-9edd-27ee5bf7989b\">Other changes<\/h2>\n\n\n\n<p>The full list of changes is available at PHP's website. Here is a link to the most important changes - <a rel=\"noreferrer noopener\" aria-label=\"Backwards Incompatible Changes PHP 7.3 (opens in a new tab)\" href=\"https:\/\/www.php.net\/manual\/en\/migration73.incompatible.php\" target=\"_blank\">Backwards Incompatible Changes PHP 7.3<\/a>.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP 7.3 is now available on all ICDSoft servers. Check our blog post for more information on the most important changes in the new version.<\/p>\n","protected":false},"author":1,"featured_media":5022,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"advgb_blocks_editor_width":"","advgb_blocks_columns_visual_guide":"","footnotes":""},"categories":[1,5],"tags":[],"class_list":{"0":"post-5009","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-general","8":"category-tech"},"author_meta":{"display_name":"ICDSoft","author_link":"https:\/\/www.icdsoft.com\/blog\/author\/icdsoft\/"},"featured_img":"https:\/\/www.icdsoft.com\/blog\/wp-content\/uploads\/2019\/06\/Webysther_20160423_-_Elephpant.svg-300x206.png","featured_image_src":"https:\/\/www.icdsoft.com\/blog\/wp-content\/uploads\/2019\/06\/Webysther_20160423_-_Elephpant.svg.png","featured_image_src_square":"https:\/\/www.icdsoft.com\/blog\/wp-content\/uploads\/2019\/06\/Webysther_20160423_-_Elephpant.svg.png","author_info":{"display_name":"ICDSoft","author_link":"https:\/\/www.icdsoft.com\/blog\/author\/icdsoft\/"},"coauthors":[],"tax_additional":{"categories":{"linked":["<a href=\"https:\/\/www.icdsoft.com\/blog\/category\/general\/\" class=\"advgb-post-tax-term\">General<\/a>","<a href=\"https:\/\/www.icdsoft.com\/blog\/category\/tech\/\" class=\"advgb-post-tax-term\">Technology<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">General<\/span>","<span class=\"advgb-post-tax-term\">Technology<\/span>"]}},"comment_count":"0","relative_dates":{"created":"Posted 7 years ago","modified":"Updated 12 months ago"},"absolute_dates":{"created":"Posted on June 18, 2019","modified":"Updated on August 12, 2025"},"absolute_dates_time":{"created":"Posted on June 18, 2019 11:37 am","modified":"Updated on August 12, 2025 6:05 am"},"featured_img_caption":"","series_order":"","_links":{"self":[{"href":"https:\/\/www.icdsoft.com\/blog\/wp-json\/wp\/v2\/posts\/5009","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.icdsoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.icdsoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.icdsoft.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.icdsoft.com\/blog\/wp-json\/wp\/v2\/comments?post=5009"}],"version-history":[{"count":29,"href":"https:\/\/www.icdsoft.com\/blog\/wp-json\/wp\/v2\/posts\/5009\/revisions"}],"predecessor-version":[{"id":5945,"href":"https:\/\/www.icdsoft.com\/blog\/wp-json\/wp\/v2\/posts\/5009\/revisions\/5945"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.icdsoft.com\/blog\/wp-json\/wp\/v2\/media\/5022"}],"wp:attachment":[{"href":"https:\/\/www.icdsoft.com\/blog\/wp-json\/wp\/v2\/media?parent=5009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.icdsoft.com\/blog\/wp-json\/wp\/v2\/categories?post=5009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.icdsoft.com\/blog\/wp-json\/wp\/v2\/tags?post=5009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}