cornishpirate Posted August 22, 2015 Share Posted August 22, 2015 Have just been playing with PHP 7 RC1 using these instructions as a guide: https://phpdave.wordpress.com/2015/06/15/run-php-7-alpha-on-windows-in-3-steps/ Could only use the built-in webserver and php.ini needed tweeking for mysqli but, all in all, a very simple process. Using my heavily modified RC2a system, I managed to load all pages very easily and VERY FAST! Encouraging. Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted August 22, 2015 Share Posted August 22, 2015 Lucky you :D - I've been cleaning up my custom code while trying to get 5.4/5.5 working. KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
MrPhil Posted August 22, 2015 Share Posted August 22, 2015 PHP 7? Was PHP 6 ever released? Are you sure that isn't PHP 5.7? Link to comment Share on other sites More sharing options...
ArtcoInc Posted August 22, 2015 Share Posted August 22, 2015 @@MrPhil https://secure.php.net/index.php#id2015-08-21-1 Malcolm Link to comment Share on other sites More sharing options...
MrPhil Posted August 22, 2015 Share Posted August 22, 2015 Um, OK. If PHP 6 is still bleeding edge and apparently not in production use anywhere, I wonder why anyone would even bother playing with PHP 7 at this time. Whatever. Link to comment Share on other sites More sharing options...
cornishpirate Posted August 22, 2015 Author Share Posted August 22, 2015 Because it will be released this year and the performance improvement is amazing. Check out the benchmarks. Link to comment Share on other sites More sharing options...
♥John W Posted August 22, 2015 Share Posted August 22, 2015 PHP 6 is not going to be released. I'm not really a dog. Link to comment Share on other sites More sharing options...
cornishpirate Posted August 22, 2015 Author Share Posted August 22, 2015 Are you sure that isn't PHP 5.7? There isn't a PHP 5.7. Details about PHP 7.0 RC1 are at http://www.php.net Extract: PHP 7.0.0 comes with new version of the Zend Engine with features such as (incomplete list): Improved performance: PHP 7 is up to twice as fast as PHP 5.6 Consistent 64-bit support Many fatal errors are now Exceptions Removal of old and unsupported SAPIs and extensions The null coalescing operator (??) Combined comparison Operator (<=>) Return Type Declarations Scalar Type Declarations Anonymous Classes Link to comment Share on other sites More sharing options...
MrPhil Posted August 23, 2015 Share Posted August 23, 2015 PHP 6 is not going to be released. Hmm. So PHP is taking a page from Microsoft and skipping version numbers? Lovely. Just lovely. Link to comment Share on other sites More sharing options...
Guest Posted November 2, 2015 Share Posted November 2, 2015 So i've updated my site to PHP5.6 and it works fine. Will I need to do anything else when PHP7 comes out? Link to comment Share on other sites More sharing options...
ArtcoInc Posted November 2, 2015 Share Posted November 2, 2015 Hmm. So PHP is taking a page from Microsoft and skipping version numbers? Lovely. Just lovely. @@MrPhil From what I've heard, Microsoft went from Windows 8.1 to Windows 10 (skipping Windows 9) because ... Way back when, when Microsoft moved from the Windows 95/98 platform to the Windows NT/2000/XP/etc platform, software developers had to put checks in their installation code to determine if they would/could install on a Win95/98 -vs- Win NT/2K/XP OS. So, there were checks for "Windows 9xxx". While current applications may not make these checks, in order to avid problems with legacy code, Microsoft just skipped the Windows 9 version number. Whether this is true or not, I can not say :- Malcolm Link to comment Share on other sites More sharing options...
MrPhil Posted November 3, 2015 Share Posted November 3, 2015 Whether this is true or not, I can not say :- Yeah, I've heard that account too. Even if it is true (and it could be), it indicates some pretty sloppy coding practices by developers (including Microsoft) in the past. Hard to believe but entirely possible. Link to comment Share on other sites More sharing options...
cornishpirate Posted November 6, 2015 Author Share Posted November 6, 2015 So i've updated my site to PHP5.6 and it works fine. Will I need to do anything else when PHP7 comes out? Should be OK as long as you've moved to MySQli. From memory, I just changed the code to avoid Deprecated warnings on PHP 4 style constructors (methods that have the same name as the class they are defined in). Working well on my test site with PHP7 RC6, but will be giving it a comprehensive test as soon as 7.0 is released, likely to be next week. Link to comment Share on other sites More sharing options...
cornishpirate Posted November 14, 2015 Author Share Posted November 14, 2015 Nice free guide 'Upgrading to PHP 7" http://www.oreilly.com/web-platform/free/files/upgrading-to-php-seven.pdf Link to comment Share on other sites More sharing options...
♥John W Posted November 14, 2015 Share Posted November 14, 2015 Thanks for the link to the guide. I'm only a couple chapters in reading but I like it. I'm not really a dog. Link to comment Share on other sites More sharing options...
cornishpirate Posted December 10, 2015 Author Share Posted December 10, 2015 PHP7.0 now released and performing extremely well under Plesk 12.5 and nginx. No new problems found yet - will continue testing for at least another month. Very encouraging for the world of PHP. Link to comment Share on other sites More sharing options...
TaylorR Posted January 21, 2016 Share Posted January 21, 2016 I have also started working on PHP 7 for past 15 days and the most significant advancement which I found out in my application is that it has become quite faster. It takes very less time in loading any page. It is really great working on PHP 7. Link to comment Share on other sites More sharing options...
dr_lucas Posted January 31, 2016 Share Posted January 31, 2016 So i've updated my site to PHP5.6 and it works fine. Will I need to do anything else when PHP7 comes out? Yes, you will need to modify classes to use __construct classes to prevent DEPRECATED errros, but other than that - it should work just fine when switching from code already compatible with 5.5 (ie. working stable without any deprecated errors on php 5.5, supports UTF-8 and mysqli) to php 7. So, for example, code like this: class infoBoxHeading extends tableBox { function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { global $infobox_header_text, $infobox_header_link; if (SKIN_INFOBOX_ACTIVE == 'true'){ $infobox_header_text = $contents[0]['text']; $infobox_header_link = $right_arrow; } else { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="20" class="infoBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="20" class="infoBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="infoBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } } Must be changed to this: class infoBoxHeading extends tableBox { function __construct($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { global $infobox_header_text, $infobox_header_link; if (SKIN_INFOBOX_ACTIVE == 'true'){ $infobox_header_text = $contents[0]['text']; $infobox_header_link = $right_arrow; } else { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="20" class="infoBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="20" class="infoBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="infoBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } } As you can see, the only modification was: function infoBoxHeading changed to function __construct I highly recommend switching to php 7, if you can. Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
dr_lucas Posted February 5, 2016 Share Posted February 5, 2016 Actually the specific modification example I gave is not so good, because this infoBoxHeading class extends tableBox class and in this case it would be correct to modify tableBox class first from: class tableBox{ function tableBox{ // some code } // more code } TO: class tableBox{ function __construct(){ //leave it empty } function tableBox{ // some code } // more code } and then on the extended class, do this: class infoBoxHeading extends tableBox { function __construct($contents, $left_corner = true, $right_corner = true, $right_arrow = false) { global $infobox_header_text, $infobox_header_link; parent::__construct(); //calling the parent constructor, as tableBox method is being used here in this class if (SKIN_INFOBOX_ACTIVE == 'true'){ $infobox_header_text = $contents[0]['text']; $infobox_header_link = $right_arrow; } else { $this->table_cellpadding = '0'; if ($left_corner == true) { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif'); } else { $left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif'); } if ($right_arrow == true) { $right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>'; } else { $right_arrow = ''; } if ($right_corner == true) { $right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif'); } else { $right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14'); } $info_box_contents = array(); $info_box_contents[] = array(array('params' => 'height="20" class="infoBoxHeading"', 'text' => $left_corner), array('params' => 'width="100%" height="20" class="infoBoxHeading"', 'text' => $contents[0]['text']), array('params' => 'height="14" class="infoBoxHeading" nowrap', 'text' => $right_corner)); $this->tableBox($info_box_contents, true); } } } Note that we don't only modify the method name here from infoBoxHeading to __construct, but we are also calling the parent construct via parent::__construct(); Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 9, 2016 Share Posted February 9, 2016 just for the fun of it, tonight after midnight I changed version to php7 for a short while I had a (custom) badly coded break statement in application top I had to change this line from single to double quotes if (!tep_session_is_registered("SESSION_USER_AGENT")) { I also use apc caching and had to change the references to apc_xxx to apcu_xxx Now, with the little tests I made on home page, categories page and product info page, it only gave me the construct warnings. So overall pretty happy. Fix the constructors, I'll take some performance baseline numbers and readup on what potentially can go wrong before taking the plunge. KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
MrPhil Posted February 9, 2016 Share Posted February 9, 2016 I had to change this line from single to double quotes if (!tep_session_is_registered("SESSION_USER_AGENT")) { Actually, a macro name (defined constant) should never be within quotes. They are stand-alone strings. if (!tep_session_is_registered(SESSION_USER_AGENT)) { Link to comment Share on other sites More sharing options...
burt Posted February 9, 2016 Share Posted February 9, 2016 @@MrPhil @@bruyndoncx That is mostly true. I was caught out doing something recently; if (defined(SOME_TEXT)) echo SOME_TEXT; needs to be if (defined('SOME_TEXT')) echo SOME_TEXT; The lack of apostrophes stumped me for an afternoon lol Link to comment Share on other sites More sharing options...
dr_lucas Posted April 6, 2016 Share Posted April 6, 2016 it will be released this year and the performance improvement is amazing. PHP 7 has already been released @ Nov-Dec 2015, and yes, it does have an excellent performance improvement. Did I help you? Click "Like" or "Thanks"! It's free of charge. :)My contributions:Total Configuration (newly updated 07/2018, for both osC 2.2 and 2.3.4.1 BS Frozen CE)User Tracking with Admin 1.0 (newly updated 07/2018)FedEx - Web Services v9, FAQ System , Who's Online Enhancement, Order Editor, MoneyBookers IPN, Ship in Cart (MS2), Admin Products Paging, Margin Report v1.00, 2Checkout INS / IPN (Instant Notification System) for MS2.2, Visitor Web Stats, Time Zone Offset - Adjust to match your location, Category Meta Tags Link to comment Share on other sites More sharing options...
cornishpirate Posted April 29, 2016 Author Share Posted April 29, 2016 After exhaustive testing on our preview site, I took a deep breath and invoked PHP 7.05 on the live site yesterday. Pleased to report that all went extremely well and the performance improvement is considerable. No horrible suprises in the error logs either. Link to comment Share on other sites More sharing options...
Dan Cole Posted April 29, 2016 Share Posted April 29, 2016 @@cornishpirate Alan, what version of osC are you running it with? Dan Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.