3v4l.org

run code in 300+ PHP versions simultaneously
/** * Osclass – software for creating and publishing online classified advertising platforms * * Copyright (C) 2012 OSCLASS * * This program is free software: you can redistribute it and/or modify it under the terms * of the GNU Affero General Public License as published by the Free Software Foundation, * either version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public * License along with this program. If not, see <http://www.gnu.org/licenses/>. */ //customize Head function customHead() { ?> <script type="text/javascript"> jQuery(document).ready(function(){ $('select[name="mailserver_type"]').bind('change', function(){ if( $(this).val() == 'gmail' ) { $('input[name="mailserver_host"]').val('smtp.gmail.com'); $('input[name="mailserver_host"]').attr('readonly', true); $('input[name="mailserver_port"]').val('465'); $('input[name="mailserver_port"]').attr('readonly', true); $('input[name="mailserver_username"]').val(''); $('input[name="mailserver_password"]').val(''); $('input[name="mailserver_ssl"]').val('ssl'); $('input[name="mailserver_auth"]').attr('checked', true); $('input[name="mailserver_pop"]').attr('checked', false); } else { $('input[name="mailserver_host"]').attr('readonly', false); $('input[name="mailserver_port"]').attr('readonly', false); } }); $('#testMail').bind('click', function() { $.ajax({ "url": "<?php echo osc_admin_base_url(true)?>?page=ajax&action=test_mail", "dataType": 'json', success: function(data) { $('#testMail_message p').html(data.html); $('#testMail_message').css('display', 'block'); if( data.status == 1 ) { $('#testMail_message').addClass('ok'); } else { $('#testMail_message').addClass('error'); } } }); }); }); </script> <?php } osc_add_hook('admin_header','customHead'); function render_offset() { return 'row-offset'; } function addHelp() { echo '<p>' . __("Modify the settings of the mail server from which your site's emails are sent. <strong>Be careful</strong>: these settings can vary depending on your hosting or server. If you run into any issues, check your hosting's help section.") . '</p>'; } osc_add_hook('help_box','addHelp'); osc_add_hook('admin_page_header','customPageHeader'); function customPageHeader(){ ?> <h1><?php _e('Settings'); ?> <a href="#" class="btn ico ico-32 ico-help float-right"></a> </h1> <?php } function customPageTitle($string) { return sprintf(__('Mail Settings &raquo; %s'), $string); } osc_add_filter('admin_title', 'customPageTitle'); osc_current_admin_theme_path( 'parts/header.php' ); ?> <div id="mail-setting"> <!-- settings form --> <div id="mail-settings"> <h2 class="render-title"><?php _e('Mail Settings'); ?></h2> <ul id="error_list"></ul> <form name="settings_form" action="<?php echo osc_admin_base_url(true); ?>" method="post"> <input type="hidden" name="page" value="settings" /> <input type="hidden" name="action" value="mailserver_post" /> <fieldset> <div class="form-horizontal"> <div class="form-row"> <div class="form-label"><?php _e('Server type'); ?></div> <div class="form-controls"> <select name="mailserver_type"> <option value="custom" <?php echo (osc_mailserver_type() == 'custom') ? 'selected="true"' : ''; ?>><?php _e('Custom Server'); ?></option> <option value="gmail" <?php echo (osc_mailserver_type() == 'gmail') ? 'selected="true"' : ''; ?>><?php _e('GMail Server'); ?></option> </select> </div> </div> <div class="form-row"> <div class="form-label"><?php _e('Hostname'); ?></div> <div class="form-controls"> <input type="text" class="input-large" name="mailserver_host" value="<?php echo osc_esc_html(osc_mailserver_host()); ?>" /> </div> </div> <div class="form-row"> <div class="form-label"><?php _e('Server port'); ?></div> <div class="form-controls"> <input type="text" class="input-large" name="mailserver_port" value="<?php echo osc_esc_html(osc_mailserver_port()); ?>" /> </div> </div> <div class="form-row"> <div class="form-label"><?php _e('Username'); ?></div> <div class="form-controls"> <input type="text" class="input-large" name="mailserver_username" value="<?php echo osc_esc_html(osc_mailserver_username()); ?>" /> </div> </div> <div class="form-row"> <div class="form-label"><?php _e('Password'); ?></div> <div class="form-controls"> <input type="text" class="input-large" name="mailserver_password" value="<?php echo osc_esc_html(osc_mailserver_password()); ?>" /> </div> </div> <div class="form-row"> <div class="form-label"><?php _e('Encryption'); ?></div> <div class="form-controls"> <input type="text" class="input-medium" name="mailserver_ssl" value="<?php echo osc_esc_html(osc_mailserver_ssl()); ?>" /> <?php _e('Options: blank, ssl or tls'); ?> <?php if( php_sapi_name() == 'cgi-fcgi' || php_sapi_name() == 'cgi' ) { ?> <div class="flashmessage flashmessage-inline warning"> <p><?php _e("Cannot be sure that Apache Module <b>mod_ssl</b> is loaded."); ?></p> </div> <?php } else if( 0==0 /*!@apache_mod_loaded('mod_ssl')*/ ) { // Modificat: Da eroare pe mxhost cand se face verificarea la mod_ssl ?> <div class="flashmessage flashmessage-inline warning"> <p><?php _e("Apache Module <b>mod_ssl</b> is not loaded"); ?></p> </div> <?php } ?> </div> </div> <div class="form-row"> <div class="form-label"><?php _e('SMTP'); ?></div> <div class="form-controls"> <div class="form-label-checkbox"><input type="checkbox" <?php echo ( osc_mailserver_auth() ? 'checked="checked"' : '' ); ?> name="mailserver_auth" value="1" /> <?php _e('SMTP authentication enabled'); ?></div> </div> </div> <div class="form-row"> <div class="form-label"><?php _e('POP'); ?></div> <div class="form-controls"> <div class="form-label-checkbox"><input type="checkbox" <?php echo ( osc_mailserver_pop() ? 'checked="checked"' : '' ); ?> name="mailserver_pop" value="1" /> <?php _e('Use POP before SMTP'); ?></div> </div> </div> <div class="form-actions"> <input type="submit" id="save_changes" value="<?php echo osc_esc_html( __('Save changes') ); ?>" class="btn btn-submit" /> </div> </div> </fieldset> </form> </div> <!-- /settings form --> </div> <?php osc_current_admin_theme_path( 'parts/footer.php' ); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.150.0170.06718.86
5.4.140.0070.07316.55
5.4.130.0270.03016.32
5.4.120.0070.03716.38
5.4.110.0070.03716.29
5.4.100.0170.04016.53
5.4.90.0030.05716.64
5.4.80.0070.06016.45
5.4.70.0130.05016.41
5.4.60.0230.06016.31
5.4.50.0070.04016.40
5.4.40.0030.08016.50
5.4.30.0130.05016.34
5.4.20.0100.03716.46
5.4.10.0130.06016.64
5.4.00.0000.05015.91
5.3.250.0130.05714.53
5.3.240.0070.05714.50
5.3.230.0000.05314.59
5.3.220.0100.06714.39
5.3.210.0030.07314.50
5.3.200.0070.07314.51
5.3.190.0030.08314.46
5.3.180.0070.07714.49
5.3.170.0170.05314.44
5.3.160.0070.04014.44
5.3.150.0070.04314.38
5.3.140.0000.04714.64
5.3.130.0100.06314.48
5.3.120.0030.08014.56
5.3.110.0000.07714.56
5.3.100.0030.06713.97
5.3.90.0000.04313.98
5.3.80.0100.04013.84
5.3.70.0030.03713.86
5.3.60.0070.07013.95
5.3.50.0070.03714.04
5.3.40.0030.06013.93
5.3.30.0070.04313.86
5.3.20.0030.07313.79
5.3.10.0070.03313.59
5.3.00.0000.04013.64

preferences:
144.71 ms | 1394 KiB | 7 Q