What's happening in our world

Home / Blog

Wednesday 18th January 2017 Speed test of different versions of PHP

 During the process of building encoders and loaders we at SourceGuardian run a simple test for all the new loaders to quickly check if there are any issues before entering the thorough testing phase especially for new versions. We run the same PHP code both in source and encoded for different versions of PHP and calculate the execution time just for fun. This produces interesting results in fact. The code itself does not matter, it's a rough Pi approximation and you may find it below. For that test we changed the number of iterations up to 10 000 000 to increase the overall execution time and minimize time calculation error. Actual time does not really matter as well as the machine that runs the code, but you can see the obvious difference between versions of PHP! Have fun trying it yourself if you wish!
 
The code:
 
function microtime_float()
{
    list($usec, $sec) = explode(" ", microtime());
    return ((float)$usec + (float)$sec);
}
 
$t = microtime_float();
$pi = 4; $top = 4; $bot = 3; $minus = TRUE;
$accuracy = 10000000;
for($i = 0; $i < $accuracy; $i++)
{
  $pi += ( $minus ? -($top/$bot) : ($top/$bot) );
  $minus = ( $minus ? FALSE : TRUE);
  $bot += 2;
}
print "Pi ~=: " . $pi . "\n";
$t2 = microtime_float();
print ($t2-$t)."\n";

(we know about the optional argument of microtime() but unfortunately old PHP 1.8.x etc does not!)
 
Results:
 
 
Happy coding!
 
Best Regards,
Alexander
 

Posted on January 18th 2017 at 04:08pm
0 Comments
Labels: php speed

Monday 24th October 2016 Update of SourceGuardian - version 11.0.6

- Fixed __DIR__ and __FILE__ constants that were statically compiled when used in initialization expressions in PHP5.6. If you get issues with using __DIR__ or __FILE__ in your PHP 5.6 code, re-encode the files and install the updated loaders.

- Fixed PHP_OS and some other constants were statically compiled for PHP7. If you get issues with using PHP_OS or other constants in your PHP7 code, re-encode your files.

- We updated how empty files are processed. Now empty files are copied to the target folder if it's specified. Empty files are skipped from processing if the target folder is not specified. In either case empty files are not counted as errors anymore. The encoding log will still indicate empty files with [11] code.

- We added the --verbose option to the command line encoder. Options are 0-quiet, 1-print only errors in the log, 2-print standard log. 2 is default. You may also add this option to "Additional Command Line Options" in "Advanced settings" if you want to change the encoding log when using GUI.

- The GUI license generator must correctly handle http:// network paths to the license. In that case the license is created in the target folder under the specified URL path, the http:// and domain name are filtered to build a correct local path to the license.

- Updated loaders for PHP 5.6 and PHP7

- We updated loaders for ARMhf (Raspberry Pi and other boards) and ARMel platforms. Please download new loaders from our web site

We recommend that you update the encoder and re-encode your files if you are encoding for PHP 5.6 or PHP7. Please also update the loaders.

 

Posted on October 24th 2016 at 07:11am by Alex
0 Comments
Labels: 11

Monday 12th September 2016 Loaders updated for Raspberry Pi (ARMhf) and ARMel

We have added support for PHP7 and updated loaders for ARMhf (Raspberry Pi and other boards) and ARMel platforms. Please download new loaders from our web site or click here to use our online  loader assistant to know the loader you need for your system and how to install it. (The loader assistant assumes ARMhf if ARM platform is detected. If you need loaders for ARMel, please download from our website).  
 
 

Posted on September 12th 2016 at 11:09pm by Alexander
0 Comments
Labels: arm, php7, raspberry

Friday 08th July 2016 Bugfix version 11.0.1 released

 If you are using version 11 for PHP7 encoding, please update the encoder and re-encode you files. Automatic update must work and update it up to version 11.0.1. Also please download recent loaders for PHP7 version 11.0.3 from http://sourceguardian.com/loaders/
 
- Issue with __DIR__ and __FILE__ concatenation fixed for PHP7
- Issue with sg_get_const() etc loader API functions running on 64-bit platforms fixed
- Issue with encoder hangs on $_SERVER variable on WIndows fixed
 
Updating the encoder and loaders is very recommended.

Posted on July 08th 2016 at 12:32am by Alex
0 Comments
Labels: 11, php7

Monday 04th July 2016 SourceGuardian 11 launched!

We are proud to present SourceGuardian 11 - the most advanced PHP Encoder on the market, complete with a powerful GUI and protection covering the latest versions of PHP including PHP 7.0. You can encode your scripts using Windows, Mac OS X and Linux, all with a powerful GUI or using a command line interface.
 
Try the 14 days free trial and purchase the full version.
 
Protected files may run on Windows, Mac OS X, Linux, FreeBSD, embedded Linux ARM and more. For a full list of supported platforms check our loader page
 
Version 11 introduces encoding for PHP 7.0 and some new options. As usual this update is partly based on comments and suggestions of our users. We were glad to receive comments and suggestions and want to thank you very much for sharing your ideas! We are looking forward to hearing about other suggestions for improving SourceGuardian. Here is a list of recent version 11 changes.

NEW FEATURES

· Full support of PHP 7.0 encoding including the latest language options:
scalar type declarations, return type declarations, new operators, anonymous classes and more

Encoding for PHP 7.0 is fully supporting in version 11 of SourceGuardian. PHP 7.0 introduced new language features and updated bytecode format to support them. Files encoded with SourceGuardian 10.x or older need to be re-encoded with SourceGuardian 11 in order to run protected files under PHP 7.0
 
· New loaders for PHP 7.0, updated loaders for older versions of PHP

We updated loaders and created new ones for PHP 7.0. Loaders for the following operating systems are available:

· Windows 32-bit (VC6, VC9; VC11 PHP 5.5, 5.6; VC14 PHP 7.0)

· Windows 64-bit (VC9 PHP 5.3,5.4; VC11 PHP 5.5,5.6; VC14 PHP7.0)

· MacOSX (universal binaries, include i386, x86_64)

· Linux (i386, x86_64)

Updated loaders  for the following platforms are coming soon:

· Linux ARM (armel)

· Linux ARM (armhf) including Raspberry Pi

· FreeBSD (i386, x86_64)

We are happy to work with our customers if they need bespoke loaders for other custom operating system. Please contact support@sourceguardian.com if you are interested.

· We removed the @SourceGuardian tag from all the encoded files excepting files encoded with "conjunction" option.

·  Locking to a domain automatically enables www. subdomain and you do not need to specify the www. subdomain on the locking page.

·  The command line tools now return expected exit codes. The encoder returns encoding status after processing a single file. When it is processing multiple files it returns zero in case of running the process and if there are no issues in using the command line options and then you need to check the encoding log for further details. Licgen returns exit code on invalid options or status of the license generation. Sginfo returns exit code on invalid options or status of the encoded file. Please find further details in the user manual. 

·  A built-in file information tool or its command line equivalent now returns estimated memory usage for running the encoded file. This does not include any additional memory requirements of your code. Estimated memory usage also differs for versions of PHP as lengths of bytecode may vary 

·  A new sg_loader_version() function returns version of the loader. As well as any other loader functions it's available only when the loader is loaded into PHP, i.e. you may use it from your protected files or if the loader is installed to extension_dir and php.ini. 

 
 

Posted on July 04th 2016 at 04:33pm by Alex
0 Comments
Labels: 11, php7

Sunday 26th June 2016 Need to encode Symfony 2?

Do you need to encode your Symfony 2 project? Please find an article on our website we published about it. 

Posted on June 26th 2016 at 09:50am by Alex
0 Comments
Labels: symfony

Thursday 19th March 2015 Loaders updated to fix issues with Laravel and traits.

Today we updated loaders for OSX, Linux and Windows (main platforms that we support). Loaders for other supported platforms will be updated during the next major update or please contact us and we can update them sooner. 
 
This update fixes some issues with traits in PHP 5.4, 5.5 and 5.6 and as a result it fixes issues with Laravel 5 encoded files. As for Laravel, you may encode all the *.php files in the app, config, database etc folders. It's no reason to encode any vendor files as they are open source. Also do NOT encode resources and particularly views as they are not pure PHP regardless then have *.php file extensions too. 
 
If you are not sure how to install loaders or which one to choose, please use our online and free loader assistant
 

Posted on March 19th 2015 at 08:59pm by Alex
0 Comments
Labels: 5.4, 5.5, 5.6, laravel, traits

Thursday 06th November 2014 SourceGuardian 10 compatibility fix for old versions of Mac OS X

We have released a minor update of SourceGuardian 10 for OSX to fix issues with running  the encoder on old versions of OSX. If you had the following error message "dyld: lazy symbol binding failed: Symbol not found: ___strlcpy_chk" or similar in the encoding log window when encoding files for PHP 5.5 or 5.6, please download and install an updated version from your user account.  
 
 

Posted on November 06th 2014 at 09:07pm by Alex
0 Comments

Thursday 11th September 2014 Loaders updated up to version 10.1.3

If you are using version 10 of SourceGuardian, please update your loaders. The following issues were fixed in the version 10.1.3 of loaders:
 
- try/catch issues on PHP 5.0.x-5.2.x (there were no issues for newer versions of PHP). Fixed.
- customer session handler that extends standard SessionHandler class was causing the encoded php scripts to fail on exit (on session write & close). Fixed.
 
Loaders were updated for Windows, Mac OS X, Linux.
 
We also updated loaders for embedded Linux solutions running on ARM:
- Linux ARMel platform
- Linux ARMhf platform including RaspberryPi, BeagleBoard, CubieBoard and more 
 
And finally we updated loaders for HP-UX IA64:
- HP-UX Itanium (IA64) 32-bit
- HP-UX Itanium (IA64) 64-bit
 
Support of SourceGuardian 10 and PHP 5.6 were added.
 
Please download updated loaders from our loaders page.

Posted on September 11th 2014 at 12:58pm by Alex
0 Comments
Labels: 10, 10.1.3, arm, hp-ux, hpux

Tuesday 01st July 2014 SourceGuardian 10 launched

We are proud to present SourceGuardian 10 - the most advanced PHP Encoder on the market, complete with a powerful GUI and protection covering the latest versions of PHP including PHP 5.6. You can encode your scripts using Windows, Mac OS X and Linux, all with a powerful GUI or using a command line interface.
 
Try the 14 days free trial and purchase the full version.
 
Protected files may run on Windows, Mac OS X, Linux, FreeBSD, embedded Linux ARM and more. For a full list of supported platforms check our loader page
 
Version 10 introduces improved code protection methods as well as encoding for PHP 5.6 and some new options. As usual this update is partly based on comments and suggestions of our users. We were glad to receive comments and suggestions and want to thank you very much for sharing your ideas! We are looking forward to hearing about other suggestions for improving SourceGuardian. Here is a list of recent version 10 changes.

NEW FEATURES

· Improved code protection methods

· Full support of PHP 5.6 encoding including the latest language options: constant scalar expressions,
variadic functions operator, updated use operator and more

Encoding for PHP 5.6 is fully supporting in version 10 of SourceGuardian. PHP 5.6 introduced new language features and updated bytecode format to support them. Files encoded with SourceGuardian 8, 9.x or older will need to be re-encoded with SourceGuardian 10 in order to run them under PHP 5.6

· New loaders for PHP 5.6, updated loaders for older versions of PHP
We updated loaders and created new ones for PHP 5.6. Loaders for the following operating systems are
available:

· Windows 32-bit (VC6, VC9; VC11 PHP 5.5, 5.6)

· Windows 64-bit (VC9 PHP 5.3,5.4; VC11 PHP 5.5,5.6)

· MacOSX (universal binaries, include i386, x86_64)

· Linux (i386, x86_64)

· FreeBSD (i386, x86_64)

We update the following loaders on request. Please check our blog and the loaders page for new versions 

· OpenBSD (i386, x86_64) 

· IBM PowerLinux

· HP-UX Itanium

· Linux ARM (armel)

· Linux ARM (armhf) including Raspberry Pi

We are happy to work with our customers if they need bespoke loaders for other custom operating system. Please contact support@sourceguardian.com if you are interested.

·  A closing PHP tag is not added anymore to the end of encoded files. It's not needed, Zend recommends to not use it. Omitting the closing tag 'automatically' protects against 'headers already sent' errors if any of the encoded files were accidentally opened/saved in the editor and some characters were added at the end. Omitting the closing tag does not affect execution of protected files.

·  SG_LIC_PATH environment variable may be used to specify where the loader should search for a license file.

·  PHP short tags <? ?> are enabled by default. If you do not need them enabled for any reason, you may turn them off in advanced settings in GUI or by using the new --no-short-tags option in the command line. The old --short-tags option has been removed.

·  License generation fixed in GUI when a URL is specified as a license file name.

·  Fixed how encoding only of changed files works in GUI.

·  A new 'Refresh' button added to the GUI for updating the project tree. It is useful if any of the files were changed or added to the folders behind the encoder GUI. Also automatic refresh happens when you encode only files updated since the last encoding.

·  A new --keep-file-date command line option added to keep the modification date for encoded files the same as the modification date of source files. The same option is available in GUI in Advanced settings

 

Posted on July 01st 2014 at 12:28pm by Alex
0 Comments
Labels: 10, 5.6, php 5.6
Page 1 2 3 4 5 6 7 >>

Links

TRY SOURCEGUARDIAN FREE FOR 14 DAYS
Account Login:

login Forgotten Password?
Connect with us
Bookmark
facebook linkedin twitter rss
© Copyright 2002 - 2016 SourceGuardian Limited
Privacy Policy l Terms & Conditions l Company Info l Contact us l Sitemap l PHP Weekly News